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]

[commit] Re: New ARI warning Sat Jun 26 01:54:22 UTC 2010


> 282a283
> > gdb/dwarf2expr.c:338: regression: hash: Do not use ' #...', instead use '#...'(some compilers only correctly parse a C preprocessor directive when '#' is the first character on the line)
> gdb/dwarf2expr.c:338:  #define sign_ext(x) ((LONGEST) (((x) ^ sign_bit) - sign_bit))
> 283a285
> > gdb/dwarf2expr.c:883: regression: hash: Do not use ' #...', instead use '#...'(some compilers only correctly parse a C preprocessor directive when '#' is the first character on the line)
> gdb/dwarf2expr.c:883:  #undef sign_ext

Huh, interesting.  Fixed by the following patch, committed to mainline.

Bye,
Ulrich

ChangeLog:

	* dwarf2expr.c (execute_stack_op): Place preprocessor
	directives at the start of the source line.

Index: gdb/dwarf2expr.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2expr.c,v
retrieving revision 1.48
diff -u -p -r1.48 dwarf2expr.c
--- gdb/dwarf2expr.c	25 Jun 2010 13:00:32 -0000	1.48
+++ gdb/dwarf2expr.c	26 Jun 2010 14:01:18 -0000
@@ -335,7 +335,7 @@ static void
 execute_stack_op (struct dwarf_expr_context *ctx,
 		  const gdb_byte *op_ptr, const gdb_byte *op_end)
 {
-  #define sign_ext(x) ((LONGEST) (((x) ^ sign_bit) - sign_bit))
+#define sign_ext(x) ((LONGEST) (((x) ^ sign_bit) - sign_bit))
   ULONGEST sign_bit = (ctx->addr_size >= sizeof (ULONGEST) ? 0
 		       : ((ULONGEST) 1) << (ctx->addr_size * 8 - 1));
   enum bfd_endian byte_order = gdbarch_byte_order (ctx->gdbarch);
@@ -880,5 +880,5 @@ execute_stack_op (struct dwarf_expr_cont
 
   ctx->recursion_depth--;
   gdb_assert (ctx->recursion_depth >= 0);
-  #undef sign_ext
+#undef sign_ext
 }


-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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