Fix build error in sol-thread.c:info_cb
authorJoel Brobecker <brobecker@gnat.com>
Tue, 30 Apr 2013 11:36:45 +0000 (11:36 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 30 Apr 2013 11:36:45 +0000 (11:36 +0000)
gdb/ChangeLog:

        * sol-thread.c (info_cb) [ti.ti_startfunc != 0]: Change type
        of local variable msym to const struct bound_minimal_symbol.
        Adjust use accordingly.
        [ti.ti_state == TD_THR_SLEEP]: Likewise.

gdb/ChangeLog
gdb/sol-thread.c

index 5a8935d48bfc16a2261187da35d12833241e45ed..05f431dd0a3e2b9f86999d96dd766e27d40417b5 100644 (file)
@@ -2,6 +2,13 @@
 
        * MAINTAINERS (Write After Approval): Add myself to the list.
 
+2013-04-30  Joel Brobecker  <brobecker@adacore.com>
+
+       * sol-thread.c (info_cb) [ti.ti_startfunc != 0]: Change type
+       of local variable msym to const struct bound_minimal_symbol.
+       Adjust use accordingly.
+       [ti.ti_state == TD_THR_SLEEP]: Likewise.
+
 2013-04-30  Samuel Thibault  <samuel.thibault@gnu.org>
 
        * i386gnu-nat.c (CREG_OFFSET): New macro.
index ec3df83f33c380716404619eea2dbe58cb920e4b..fd29100f8a466014da25b3ec92dbaacba7b8210a 100644 (file)
@@ -1115,11 +1115,12 @@ info_cb (const td_thrhandle_t *th, void *s)
       /* Print thr_create start function.  */
       if (ti.ti_startfunc != 0)
        {
-         struct minimal_symbol *msym;
-         msym = lookup_minimal_symbol_by_pc (ti.ti_startfunc);
-         if (msym)
+         const struct bound_minimal_symbol msym
+           = lookup_minimal_symbol_by_pc (ti.ti_startfunc);
+
+         if (msym.minsym)
            printf_filtered ("   startfunc: %s\n",
-                            SYMBOL_PRINT_NAME (msym));
+                            SYMBOL_PRINT_NAME (msym.minsym));
          else
            printf_filtered ("   startfunc: %s\n",
                             paddress (target_gdbarch (), ti.ti_startfunc));
@@ -1128,11 +1129,12 @@ info_cb (const td_thrhandle_t *th, void *s)
       /* If thread is asleep, print function that went to sleep.  */
       if (ti.ti_state == TD_THR_SLEEP)
        {
-         struct minimal_symbol *msym;
-         msym = lookup_minimal_symbol_by_pc (ti.ti_pc);
-         if (msym)
+         const struct bound_minimal_symbol msym
+           = lookup_minimal_symbol_by_pc (ti.ti_pc);
+
+         if (msym.minsym)
            printf_filtered (" - Sleep func: %s\n",
-                            SYMBOL_PRINT_NAME (msym));
+                            SYMBOL_PRINT_NAME (msym.minsym));
          else
            printf_filtered (" - Sleep func: %s\n",
                             paddress (target_gdbarch (), ti.ti_startfunc));