Can I analyze a program s core dump file with GDB when it has command-line parameters

0 votes

The following is what my program operates like.

exe -p param1 -i param2 -o param3

It crashed and generated a core dump file, core.pid.

What I want to do is analyze the core dump file by doing this.

gdb ./exe -p param1 -i param2 -o param3 core.pid

But the GDB recognizes parameters of the EXE file as GDB's input.

How can I analyze a core dump file in this situation?

Jul 1, 2019 in Linux Administration by Upasana
• 8,620 points
8,001 views

1 answer to this question.

0 votes

You can simply use of GDB, to debug coredump files:

gdb <executable_path> <coredump_file_path>

Coredump file for a process gets created, as "core.pid" file. After you get inside the gdb-prompt;

...
(gdb) where

This will get you with the information, of the stack, where you can analyse the cause of the crash/fault.

Hope this helps you!

To learn more about Linux, it's recommended to join Linux course online today.

Thanks.

answered Jul 1, 2019 by Shubham
• 13,490 points

Related Questions In Linux Administration

0 votes
0 answers

How can I convert a series of images to a PDF from the command line on linux?

I have a scanning server I wrote ...READ MORE

Apr 21, 2022 in Linux Administration by Edureka
• 13,690 points
492 views
0 votes
0 answers

Linux Command for getting a dump of hex values bytes from Pcap File

I require a Linux command to display ...READ MORE

Apr 13, 2022 in Linux Administration by Rahul
• 9,680 points
813 views
0 votes
0 answers

How to convert a PDF into JPG with command line in Linux?

What are fast and reliable ways for ...READ MORE

Apr 14, 2022 in Linux Administration by Aditya
• 7,680 points
551 views
0 votes
0 answers

Linux Command for getting a dump of hex values bytes from Pcap File

I require a linux command to display ...READ MORE

Apr 20, 2022 in Linux Administration by Edureka
• 13,690 points
575 views
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
1,129 views
0 votes
2 answers

Install postgreSQL on Ubuntu

Follow the below commands to install PostgreSQL (PSQL) ...READ MORE

answered Nov 12, 2020 in Database by Prachi
• 140 points
1,169 views
0 votes
1 answer

Access progrs prompt without switching accounts

Use the following to get the postgres prompt ...READ MORE

answered Mar 22, 2019 in Database by Mahi
791 views
0 votes
1 answer
0 votes
1 answer

Writing a heredoc to a file in a script

try to use tee: tee newfile <<EOF line 1 line 2 line ...READ MORE

answered May 20, 2019 in Linux Administration by Shubham
• 13,490 points
1,508 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP