This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using STL containers with GDB


On Wed, Apr 23, 2008 at 09:35:09AM +1200, Nick Roberts wrote:
>  > 	So, yesterday, I decided myself to look at the code of GDB. After a
>  > quick look, I wrote this patch. I know that it's not very clean, and
>  > that it makes many assumptions about STL containers, and that it cannot
>  > be considered as a long term feature for GDB, but, believe me, it's very
>  > very usefull !
>  > 
>  > 	Now, I can look at the content of list, vector, set, map, multiset,
>  > multimap and string simply with the classic "print" command of GDB.
> 
> The Python branch appears to work for executables compiled with Gcc only.  I'm
> curious to know if this approach will work for executables built using other
> compilers?

Vincent's implementation has the layout of the GNU STL implementation
hardcoded into it - so even less portable than the Python
implementation, which uses the field names.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]