How do you examine core files in dbx?

ctote picture ctote · Feb 11, 2011 · Viewed 34.4k times · Source

I'm working on AIX and have a process that keeps crashing. I've never examined core files, and would like some guidance if possible. I'm using dbx. How can I (a) make sure the core file is going where I want it to go and (b) see the state of the process before it crashed?

Thanks!

Answer

JacquelineIO picture JacquelineIO · Feb 7, 2012

I do okay stepping through a run but also am not sure about debugging a core. I found these commands are probably the ones to focus on. There are probably more.

Once you have your core running in dbx:

  1. 'where' -- to show the stack
  2. 'up' or 'down' -- to move through the frames and then you
  3. 'print var' -- display the variables
  4. and 'list' or 'edit' -- will display the file information at that current location

Looking here under "Examining Data" helped me out.