* Stabs: constant string, constant boolean
@ 2004-01-26 23:22 Daniël Mantione
2004-01-27 4:20 ` Ian Lance Taylor
0 siblings, 1 reply; 6+ messages in thread
From: Daniël Mantione @ 2004-01-26 23:22 UTC (permalink / raw)
To: gdb
Hi,
Could someone enlighten me on the support of the constant string and
constant boolean for stabs debug information.
I tried several versions of gdb (not yet 6.0), but all I get out of them
is "error type". I try to generate debug info exactly as described on
http://source.redhat.com/gdb/current/onlinedocs/stabs_3.html#SEC16
I.e. I try to add a boolean like this:
.stabs "BOOL1:c=b0;",36,0,5,0
This results in "error type". However, if I try:
.stabs "BOOL1:c=i0;",36,0,5,0
... gdb treats it as integer fine.
Any ideas which versions of gdb support these well?
Greetings,
Daniël Mantione
P.s. I'm not on this mailinglist, please cc to me.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Stabs: constant string, constant boolean 2004-01-26 23:22 Stabs: constant string, constant boolean Daniël Mantione @ 2004-01-27 4:20 ` Ian Lance Taylor 2004-01-27 8:39 ` Daniël Mantione 0 siblings, 1 reply; 6+ messages in thread From: Ian Lance Taylor @ 2004-01-27 4:20 UTC (permalink / raw) To: Daniël Mantione; +Cc: gdb Daniël Mantione <daniel@deadlock.et.tudelft.nl> writes: > Could someone enlighten me on the support of the constant string and > constant boolean for stabs debug information. > > I tried several versions of gdb (not yet 6.0), but all I get out of them > is "error type". I try to generate debug info exactly as described on > http://source.redhat.com/gdb/current/onlinedocs/stabs_3.html#SEC16 > > I.e. I try to add a boolean like this: > > .stabs "BOOL1:c=b0;",36,0,5,0 > > This results in "error type". However, if I try: > > .stabs "BOOL1:c=i0;",36,0,5,0 > > ... gdb treats it as integer fine. Looking at the code, I see that gdb only supports the 'r', 'i', and 'e' types. The 'b', 'c', 's', and 'S' types are documented, but not supported. I note this in the docs: The boolean, character, string, and set constants are not supported by GDB 4.9, but it ignores them. This is not entirely unreasonable, as the 'b', 'c', 's', and 'S' types are short on type information. I think it would normally be better to use 'e' instead of 'b' or 'c'. I suppose that 's' and 'S' aren't seen as an issue since they won't arise in C. Ian ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Stabs: constant string, constant boolean 2004-01-27 4:20 ` Ian Lance Taylor @ 2004-01-27 8:39 ` Daniël Mantione 2004-01-27 14:14 ` Daniel Jacobowitz 0 siblings, 1 reply; 6+ messages in thread From: Daniël Mantione @ 2004-01-27 8:39 UTC (permalink / raw) To: Ian Lance Taylor; +Cc: gdb On 26 Jan 2004, Ian Lance Taylor wrote: > Looking at the code, I see that gdb only supports the 'r', 'i', and > 'e' types. The 'b', 'c', 's', and 'S' types are documented, but not > supported. > > I note this in the docs: > > The boolean, character, string, and set constants are not > supported by GDB 4.9, but it ignores them. > > This is not entirely unreasonable, as the 'b', 'c', 's', and 'S' types > are short on type information. I think it would normally be better to > use 'e' instead of 'b' or 'c'. I suppose that 's' and 'S' aren't seen > as an issue since they won't arise in C. Thanks for the info, even though that is pretty bad news :( Constant sets & strings do exist in Pascal, i.e.: const str1='blablabla'; set1=['b','l','a']; I know our former team member Pierre Muller contributed some patches to add Pascal support to gdb, but apparently not to support these... Alas, Pierre has stopped with Free Pascal development; I'm currently trying to give some life-support to the debug-info generation he wrote. Greetings, Daniël ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Stabs: constant string, constant boolean 2004-01-27 8:39 ` Daniël Mantione @ 2004-01-27 14:14 ` Daniel Jacobowitz 2004-01-27 15:27 ` Daniël Mantione 0 siblings, 1 reply; 6+ messages in thread From: Daniel Jacobowitz @ 2004-01-27 14:14 UTC (permalink / raw) To: Daniël Mantione; +Cc: Ian Lance Taylor, gdb On Tue, Jan 27, 2004 at 09:39:43AM +0100, Daniël Mantione wrote: > > On 26 Jan 2004, Ian Lance Taylor wrote: > > > Looking at the code, I see that gdb only supports the 'r', 'i', and > > 'e' types. The 'b', 'c', 's', and 'S' types are documented, but not > > supported. > > > > I note this in the docs: > > > > The boolean, character, string, and set constants are not > > supported by GDB 4.9, but it ignores them. > > > > This is not entirely unreasonable, as the 'b', 'c', 's', and 'S' types > > are short on type information. I think it would normally be better to > > use 'e' instead of 'b' or 'c'. I suppose that 's' and 'S' aren't seen > > as an issue since they won't arise in C. > > Thanks for the info, even though that is pretty bad news :( > Constant sets & strings do exist in Pascal, i.e.: > > const str1='blablabla'; > set1=['b','l','a']; > > I know our former team member Pierre Muller contributed some patches to > add Pascal support to gdb, but apparently not to support these... > Alas, Pierre has stopped with Free Pascal development; I'm currently > trying to give some life-support to the debug-info generation he wrote. <plug> If you're working on new code, why not use dwarf2 instead? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Stabs: constant string, constant boolean 2004-01-27 14:14 ` Daniel Jacobowitz @ 2004-01-27 15:27 ` Daniël Mantione 2004-01-27 15:30 ` Daniel Jacobowitz 0 siblings, 1 reply; 6+ messages in thread From: Daniël Mantione @ 2004-01-27 15:27 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: Ian Lance Taylor, gdb On Tue, 27 Jan 2004, Daniel Jacobowitz wrote: > <plug> > > If you're working on new code, why not use dwarf2 instead? Does dwarf2 support passing these things to gdb then? I could start on dwarf2 support in compiler, it's on the roadmap, and if it would give us better support its even a good idea (but it doesn't help that our gdb expert left the project). On the other hand we're approaching 2.0, and that's the reason I'm working on the stabs code; sort out issues with it. Daniël ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Stabs: constant string, constant boolean 2004-01-27 15:27 ` Daniël Mantione @ 2004-01-27 15:30 ` Daniel Jacobowitz 0 siblings, 0 replies; 6+ messages in thread From: Daniel Jacobowitz @ 2004-01-27 15:30 UTC (permalink / raw) To: Daniël Mantione; +Cc: Ian Lance Taylor, gdb On Tue, Jan 27, 2004 at 04:26:31PM +0100, Daniël Mantione wrote: > On Tue, 27 Jan 2004, Daniel Jacobowitz wrote: > > > <plug> > > > > If you're working on new code, why not use dwarf2 instead? > > Does dwarf2 support passing these things to gdb then? Offhand, I don't know. But it defines them in a much clearer way than stabs, and adding them to GDB would be easier than adding the corresponding stabs support. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-01-27 15:30 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-01-26 23:22 Stabs: constant string, constant boolean Daniël Mantione 2004-01-27 4:20 ` Ian Lance Taylor 2004-01-27 8:39 ` Daniël Mantione 2004-01-27 14:14 ` Daniel Jacobowitz 2004-01-27 15:27 ` Daniël Mantione 2004-01-27 15:30 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox