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 in Linux Administration by Upasana
• 8,550 points
726 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.

answered Jul 1 by Shubham
• 13,310 points

Related Questions In Linux Administration

0 votes
1 answer
0 votes
1 answer

To attach a file using mail command on Linux

$ echo | mutt -a syslogs.tar.gz admin@domain.org READ MORE

answered Jun 28 in Linux Administration by Upasana
• 8,550 points
189 views
0 votes
1 answer

setting a variable output from a bash command

You can use $(command), which in my ...READ MORE

answered Feb 15 in Linux Administration by DareDev
• 6,810 points
88 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
93 views
0 votes
1 answer

Install postgreSQL on Ubuntu

Installing PostgreSQL on Ubuntu is very simple, ...READ MORE

answered Mar 22 in Database by Nitesh
63 views
0 votes
1 answer

Access progrs prompt without switching accounts

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

answered Mar 22 in Database by Mahi
42 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 in Linux Administration by Shubham
• 13,310 points
59 views