Patchwork Merge C++ conversion into trunk (6/6 - gdb tree macro support)

login
register
mail settings
Submitter Diego Novillo
Date Aug. 13, 2012, 12:38 a.m.
Message ID <50284C6C.4080101@google.com>
Download mbox | patch
Permalink /patch/176844/
State New
Headers show

Comments

Diego Novillo - Aug. 13, 2012, 12:38 a.m.
On 12-08-12 16:40 , Andreas Schwab wrote:
> Diego Novillo <dnovillo@google.com> writes:
>
>> diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in
>> index d1ae46d..858e490 100644
>> --- a/gcc/gdbinit.in
>> +++ b/gcc/gdbinit.in
>> @@ -182,6 +182,17 @@ document pbm
>>   Dump the bitmap that is in $ as a comma-separated list of numbers.
>>   end
>>
>> +# Define some macros helpful to gdb when it is expanding macros.
>> +macro define __FILE__ "gdb"
>> +macro define __LINE__ 1
>> +
>> +# Skip all inline functions in tree.h.
>> +# These are used in accessor macros.
>> +skip "tree.h"
>
> This command has only been added to the current gdb release.  Older
> versions will bail out at this point, so it should be moved down to the
> end of the file.

Fixed.  Thanks.


Diego.

Patch

diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in
index 858e490..6432113 100644
--- a/gcc/gdbinit.in
+++ b/gcc/gdbinit.in
@@ -186,10 +186,6 @@  end
  macro define __FILE__ "gdb"
  macro define __LINE__ 1

-# Skip all inline functions in tree.h.
-# These are used in accessor macros.
-skip "tree.h"
-
  # Gracefully handle aborts in functions used from gdb.
  set unwindonsignal on

@@ -207,3 +203,9 @@  set complaints 0
  # USE_SYSTEM_ABORT is defined, so gdb may complain and bail out.
  b exit
  b abort
+
+# Skip all inline functions in tree.h.
+# These are used in accessor macros.
+# Note that this is added at the end because older gdb versions
+# do not understand the 'skip' command.
+skip "tree.h"