[PATCH 02/16] source: add flags to print_source_lines ()

Metzger, Markus T markus.t.metzger@intel.com
Mon Jun 25 08:50:00 GMT 2012


> -----Original Message-----
> From: Tom Tromey [mailto:tromey@redhat.com]
> Sent: Friday, June 22, 2012 10:08 PM

[...]

> Jan> Make it then 'enum print_source_lines_flags flags'.
> 
> Markus> Flags is intended as bit vector. The enum just gives names to
> Markus> the individual bits.
> 
> In C it is ok to use the enum type the way that Jan suggests; and it
> makes debugging a bit simpler since gdb will print the symbolic value.
> gdb doesn't do this consistently (it doesn't do anything consistently
> :-); but it is nice to do in new code.

It's consistent in that, at least;-)

I pointed out in a reply to Jan already that this won't compile as C++.
I changed it to an enum.

Regards,
Markus.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7228 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120625/194060a4/attachment.p7s>
-------------- next part --------------
--------------------------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland 
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052


More information about the Gdb-patches mailing list