Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-09

'3var' in stabs-debuginfo. What does the 3 mean?

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joost van der Sluis

Hi all,

In TDebugInfoStabs.method_add_stabstr (unit dbgstabs) the following strings are added for parameter-types: '3var', '5const' and '3out'.

What do the numbers (3,5) before 'var', 'const' and 'out' mean?

Joost

Reply by email

Sven Barth
to Joost van der Sluis
Joost van der Sluis wrote 6 lines
Hi all, In TDebugInfoStabs.method_add_stabstr (unit dbgstabs) the following strings are added for parameter-types: '3var', '5const' and '3out'. What do the numbers (3,5) before 'var', 'const' and 'out' mean?

A little guess:
The length of the word following the number (e.g. 3var -> a 3 character string ('var') after it) - like String, but serialized. :P

Regards,
Sven

Reply by email

Graeme Geldenhuys
to Sven Barth: A little guess: The length of the word following the number (e.g. 3var -> a 3 character…

Op 2010-09-16 09:36, Sven Barth het geskryf:

A little guess: The length of the word following the number (e.g. 3var -> a 3 character string ('var') after it) - like String, but serialized. :P

:-) That's a pretty good guess - it actually makes sense.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Jonas Maebe
to Joost van der Sluis: In TDebugInfoStabs.method_add_stabstr (unit dbgstabs) the following strings are added for…
Joost van der Sluis wrote
n TDebugInfoStabs.method_add_stabstr (unit dbgstabs) the following strings are added for parameter-types: '3var', '5const' and '3out'. What do the numbers (3,5) before 'var', 'const' and 'out' mean?

See http://sourceware.org/gdb/onlinedocs/stabs.html#Methods . Method names in stabs have to be mangled according to the algorithm described in "The Annotated C++ Reference Manual, by Ellis and Stroustrup, ISBN 0-201-51459-1". That algorithm includes prepending the length to all parameter names.

Reply by email