public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Resolve aix-thread.c compile errors
@ 2022-05-13 14:43 Aditya Vidyadhar Kamath
  2022-05-16 12:49 ` Joel Brobecker
  0 siblings, 1 reply; 11+ messages in thread
From: Aditya Vidyadhar Kamath @ 2022-05-13 14:43 UTC (permalink / raw)
  To: Joel Brobecker via Gdb-patches; +Cc: Sangamesh Mallayya

[-- Attachment #1: Type: text/plain, Size: 751 bytes --]

Hi,

Folks using AIX face a compilation error while installing gdb.

In aix-thread.c we use ms-> value_address () to get the symbol address.
 But ms is a non pointer type for the symbol ->. So a compilation error [base operand of '->'  has non-pointer type 'bound_minimal_symbol' symbols[i].addr = ms-> value_address ()] is generated.

 This can be seen while running gmake in the binutils folder while installing.

 We must use ms.value_address () instead.

Please find attached the patch for the same. (See 0001-Resolve-aix-thread.c-compile-errors)

Kindly let me know if anything else is needed.

Kindly update the same so that AIX users can compile and install GDB without any compilation issues.

Thanks and regards,
Aditya.


[-- Attachment #2: 0001-Resolve-aix-thread.c-compile-errors.patch --]
[-- Type: application/octet-stream, Size: 1098 bytes --]

From 62b4fb6690eded79525523e9011e1938f60ed2f6 Mon Sep 17 00:00:00 2001
From: "aditya@ibm" <aditya.vidyadhar.kamath@ibm.com>
Date: Fri, 13 May 2022 09:09:29 -0500
Subject: [PATCH] Resolve aix-thread.c compile errors

---
 gdb/aix-thread.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 4e41cde6694..ecd8200b692 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -360,7 +360,7 @@ pdc_symbol_addrs (pthdb_user_t user, pthdb_symbol_t *symbols, int count)
 		gdb_printf (gdb_stdlog, " returning PDC_FAILURE\n");
 	      return PDC_FAILURE;
 	    }
-	  symbols[i].addr = ms->value_address ();
+	  symbols[i].addr = ms.value_address ();
 	}
       if (debug_aix_thread)
 	gdb_printf (gdb_stdlog, "  symbols[%d].addr = %s\n",
@@ -969,7 +969,7 @@ pd_enable (void)
   ms = lookup_minimal_symbol (stub_name, NULL, NULL);
   if (ms.minsym == NULL)
     return;
-  pd_brk_addr = ms->value_address ();
+  pd_brk_addr = ms.value_address ();
   if (!create_thread_event_breakpoint (target_gdbarch (), pd_brk_addr))
     return;
 
-- 
2.31.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-05-23  4:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 14:43 [PATCH] Resolve aix-thread.c compile errors Aditya Vidyadhar Kamath
2022-05-16 12:49 ` Joel Brobecker
2022-05-17 12:09   ` Aditya Vidyadhar Kamath
2022-05-17 12:29     ` Joel Brobecker
2022-05-17 13:13       ` Aditya Vidyadhar Kamath
2022-05-18 22:12         ` Joel Brobecker
2022-05-19 13:51           ` Aditya Vidyadhar Kamath
2022-05-19 18:33             ` Joel Brobecker
2022-05-20  9:03               ` Aditya Vidyadhar Kamath
2022-05-20 14:18                 ` Joel Brobecker
2022-05-23  4:36                   ` Aditya Vidyadhar Kamath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).