RE: [RFA 2/5] New patches to support --enable-targets=all for mingw64

Pierre Muller
2010-09-10T16:09:49Z

> I think it is better to use SYMBOL_VALUE_BYTES here.
> See how this field is set in mdebugread.c:
>
> e = ((struct mdebug_extra_func_info *)
> obstack_alloc (&current_objfile->objfile_obstack,
> sizeof (struct mdebug_extra_func_info)));
> memset (e, 0, sizeof (struct mdebug_extra_func_info));
> SYMBOL_VALUE_BYTES (s) = (gdb_byte *) e;
>
> This is ok with that change.

OK, this way, no need for unitptr_t, as gdb_byte *
is already a host pointer.

This is what I checked in,
thanks for the approval,

Pierre

Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.12167
diff -u -p -r1.12167 ChangeLog
--- ChangeLog 9 Sep 2010 23:04:46 -0000 1.12167
+++ ChangeLog 10 Sep 2010 16:03:15 -0000
@@ -1,3 +1,8 @@
+2010-09-10 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * alpha-mdebug-tdep.c (find_proc_desc): Use SYMBOL_VALUE_BYTES macro
+ before cast to pointer to avoid warning.
+
2010-09-09 Kevin Buettner <kevinb@redhat.com>

* v850-tdep.c (v850_gdbarch_init): Change the v850's `char'
Index: alpha-mdebug-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-mdebug-tdep.c,v
retrieving revision 1.25
diff -u -p -r1.25 alpha-mdebug-tdep.c
--- alpha-mdebug-tdep.c 23 Apr 2010 15:14:22 -0000 1.25
+++ alpha-mdebug-tdep.c 10 Sep 2010 16:03:15 -0000
@@ -115,7 +115,7 @@ find_proc_desc (CORE_ADDR pc)

if (sym)
{
- proc_desc = (struct mdebug_extra_func_info *) SYMBOL_VALUE (sym);
+ proc_desc = (struct mdebug_extra_func_info *) SYMBOL_VALUE_BYTES (sym);

/* Correct incorrect setjmp procedure descriptor from the library
to make backtrace through setjmp work. */