1

i'm new to GDB so hope it's a fair question... i would like to run a script with GDB that get a coredump file and save the BT of all threads into a file. my problem is to operate the GDB. i tried:

GDB <exe> <core file> --command = my_script

where my script is:

thread apply all bt

that doesn't work of course.

is there another way to operate GDB with a certain command? thanks alot

Nurit

1 Answer 1

3

Yes, do not put spaces around the =.

gdb <exe> <core> --command=my_script

Alternatively, just do this:

gdb -ex 'thread apply all bt' <exe> <core>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.