Home » Language IDEs » C / C++ IDE (CDT) » View source of libstdc++ class while debugging program
View source of libstdc++ class while debugging program [message #84965] |
Mon, 03 November 2003 05:41  |
Eclipse User |
|
|
|
Originally posted by: cclo.smeow.mine.nu
Dear all,
I use some classes in standard c++ library and I'd like to view the
source of it in debugging mode, just like viewing the source of my own
cpp files when I stepped into some method.
I've tried to add the path of gcc source (extracted from gcc tar ball)
into the "Additional Source Locations" of the Source Tab in the
debugging configuration for project. Could anybody tell me how to
configure CDT to do this?
best regards,
Cheng-Che Lo
|
|
| |
Re: View source of libstdc++ class while debugging program [message #85014 is a reply to message #84999] |
Tue, 04 November 2003 02:14   |
Eclipse User |
|
|
|
Originally posted by: cclo.smeow.mine.nu
I've tried the following steps, am I doing the right thing for this ?
I'm not sure is the library contains debug information, so I get the
source of gcc and re-configure it (libstdc++-v3) with --enable-debug=yes
and put it under /usr/local/src/libstdc++
# ./configure --enable-debug=yes
# make
(have all object files with the source files)
which is the directory I wrote in "Shared Libraries" tab in "Debugger"
tab of the Debug launch configuration. Also, I checked the box with
"Load shared library symbols automatically", it's on.
Besides, in the "Source" tab, "Additional Source Locations" has
both location and association to have the directory
"/usr/local/src/gcc/libstdc++", in this case.
I guess these would let the project use the shared library libstdc++
by the copy I just made (with debugging information -O0 -ggdb3).
Now against the methods of the library, it still stepping over it, not
into it.
Did I get something wrong? Any instruction or suggestion is appreciated.
So much I want to migrate all my c++ programs into eclipse. It'd be
perfect for me is this can got working.
Sorry if this is too *newbie*...
Thanks a lot and a lot.
Cheng-Che Lo
Mikhail Khodjaiants wrote:
> Check:
> - if your library contains the debug information,
> - if the library symbols are loaded when you try to step into a library
> function (use the Shared Libraries view or set the "Load shared library
> symbols automatically" options of the launch configuration),
> If your library is build in the different location you should use the
> "Associate with" option of the "Add Directory Source Location" dialog.
>
> "Cheng-Che Lo" <cclo@smeow.mine.nu> wrote in message
> news:bo5bb6$sdo$1@eclipse.org...
>
>>Dear all,
>>
>> I use some classes in standard c++ library and I'd like to view the
>>source of it in debugging mode, just like viewing the source of my own
>>cpp files when I stepped into some method.
>>
>> I've tried to add the path of gcc source (extracted from gcc tar ball)
>>into the "Additional Source Locations" of the Source Tab in the
>>debugging configuration for project. Could anybody tell me how to
>>configure CDT to do this?
>>
>>
>>best regards,
>>
>>Cheng-Che Lo
>>
>
>
>
|
|
|
Re: View source of libstdc++ class while debugging program [message #85087 is a reply to message #85014] |
Tue, 04 November 2003 10:38   |
Eclipse User |
|
|
|
Originally posted by: mikhailk.qnx.com
Check if gdb picks up the correct version of the library. You can do it by
opening the Shared Libraries view and checking if the full path of the
library is correct. The 'S' letter in the icon of the library means
indicates that library symbols are loaded.
"Cheng-Che Lo" <cclo@smeow.mine.nu> wrote in message
news:bo7jk2$82t$1@eclipse.org...
>
> I've tried the following steps, am I doing the right thing for this ?
>
> I'm not sure is the library contains debug information, so I get the
> source of gcc and re-configure it (libstdc++-v3) with --enable-debug=yes
> and put it under /usr/local/src/libstdc++
>
> # ./configure --enable-debug=yes
> # make
> (have all object files with the source files)
>
> which is the directory I wrote in "Shared Libraries" tab in "Debugger"
> tab of the Debug launch configuration. Also, I checked the box with
> "Load shared library symbols automatically", it's on.
> Besides, in the "Source" tab, "Additional Source Locations" has
> both location and association to have the directory
> "/usr/local/src/gcc/libstdc++", in this case.
>
> I guess these would let the project use the shared library libstdc++
> by the copy I just made (with debugging information -O0 -ggdb3).
> Now against the methods of the library, it still stepping over it, not
> into it.
>
> Did I get something wrong? Any instruction or suggestion is appreciated.
> So much I want to migrate all my c++ programs into eclipse. It'd be
> perfect for me is this can got working.
>
> Sorry if this is too *newbie*...
>
>
> Thanks a lot and a lot.
>
>
> Cheng-Che Lo
>
>
> Mikhail Khodjaiants wrote:
> > Check:
> > - if your library contains the debug information,
> > - if the library symbols are loaded when you try to step into a library
> > function (use the Shared Libraries view or set the "Load shared library
> > symbols automatically" options of the launch configuration),
> > If your library is build in the different location you should use the
> > "Associate with" option of the "Add Directory Source Location" dialog.
> >
> > "Cheng-Che Lo" <cclo@smeow.mine.nu> wrote in message
> > news:bo5bb6$sdo$1@eclipse.org...
> >
> >>Dear all,
> >>
> >> I use some classes in standard c++ library and I'd like to view the
> >>source of it in debugging mode, just like viewing the source of my own
> >>cpp files when I stepped into some method.
> >>
> >> I've tried to add the path of gcc source (extracted from gcc tar ball)
> >>into the "Additional Source Locations" of the Source Tab in the
> >>debugging configuration for project. Could anybody tell me how to
> >>configure CDT to do this?
> >>
> >>
> >>best regards,
> >>
> >>Cheng-Che Lo
> >>
> >
> >
> >
>
|
|
| | | | | |
Re: View source of libstdc++ class while debugging program [message #85283 is a reply to message #85268] |
Fri, 07 November 2003 01:29  |
Eclipse User |
|
|
|
Originally posted by: cclo.smeow.mine.nu
Maybe I could ask the maintainer if there's a workaround solution.
Don't know why, I'm quite glad that it's not Eclipse's problem.
Thanks for the information, it could make my life easier.
Thanks again!
Cheng-Che Lo
Mikhail Khodjaiants wrote:
> Sorry, for misinformation. It seems that gdb on Linux ignores the path set
> by the "set solib-search-path" command and loads the symbols for system
> libraries from the original location.
>
|
|
|
Goto Forum:
Current Time: Sat May 10 18:51:38 EDT 2025
Powered by FUDForum. Page generated in 0.04262 seconds
|