Author Topic: files browsing issue during debugging  (Read 8076 times)

Offline Kaijun

  • Multiple posting newcomer
  • *
  • Posts: 25
files browsing issue during debugging
« on: December 20, 2011, 12:27:53 pm »
I use C::B as debugger with gdbserver. I found I can display a source file by double clicking a file on call stack window for some shared libs. but not for other shared libs. I can not figure out, I am not sure if this issue is related to C::B or to libs build options. Any idea?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: files browsing issue during debugging
« Reply #1 on: December 20, 2011, 12:59:13 pm »
Are there any paths to the sources of the shared lib in the call stack window?
Do you have debug info for the libs in question?
What OS are you using?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Kaijun

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: files browsing issue during debugging
« Reply #2 on: December 20, 2011, 01:57:49 pm »
I also wonder why there are no full paths to the source files of shared libs in question.
All shared libs are built to debug version with openembedded linux.

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6024
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: files browsing issue during debugging
« Reply #3 on: December 21, 2011, 01:06:48 am »
I use C::B as debugger with gdbserver. I found I can display a source file by double clicking a file on call stack window for some shared libs. but not for other shared libs. I can not figure out, I am not sure if this issue is related to C::B or to libs build options. Any idea?
1, the first thing is that you can show us the debugger's debug log message.
2, I guess the issue is related this GDB post: http://sourceware.org/ml/gdb-patches/2011-12/msg00100.html
   You can see it has a new patch to handle this correctly.
Currently gdb will show the file path you pass to GCC when you compile the shared library. With the patch above, you have many options, the default option is show "full path of the source file".
« Last Edit: December 21, 2011, 01:09:47 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.