From: Josh Martin <Josh.Martin@abq.sc.philips.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH]: gdb/769 - segv fault on "info shared" on GDB 5.2.1 HPUX64 11.00
Date: Sat, 28 Sep 2002 10:23:00 -0000 [thread overview]
Message-ID: <200209281723.g8SHNep09485@atoae450.abq.sc.philips.com> (raw)
For platforms that aren't covered by the gdb/solib-foo.c files and the gdbarch
platform dependancy files the "info sharedlibrary" command will cause a
segmentation fault by dereferencing a NULL pointer (current_target_so_ops) in
gdb/solib.c:update_solib_list. The patch checks if current_target_so_ops is
NULL, and if so it responds with a "command not implemented" message.
What I really wanted to do was to implement support for HPUX 11.00 64-bit w/GCC.
It shouldn't be too difficult as 64-bit GCC in HPUX 11.00 uses GNU ld and the
"standard" elf64hppa object format. Unfortunately I had no idea how to proceed
or where to find the neccesary information, thus I stuck with this "band-aid"
patch.
What follows is a diff -up patch for gdb-5.2.1/gdb/solib.c
- Josh Martin
--- solib.c~ Tue Feb 26 18:40:35 2002
+++ solib.c Sat Sep 28 08:43:03 2002
@@ -619,6 +619,19 @@ info_sharedlibrary_command (char *ignore
int addr_width;
char *addr_fmt;
+ /*
+ This is usually defined in a platform specific solib-foo.c/.h
+ file. Eventually the definition should be migrated to the
+ gdbarch files. In the mean time keep this from core dumping on
+ platforms where there is no implementation.
+ */
+ if (current_target_so_ops == NULL)
+ {
+ printf_unfiltered("Shared library info is not yet implemented on this "
+ "platform\n");
+ return;
+ }
+
if (TARGET_PTR_BIT == 32)
{
addr_width = 8 + 4;
next reply other threads:[~2002-09-28 17:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-28 10:23 Josh Martin [this message]
2002-10-09 16:43 Josh Martin
2002-11-25 15:08 ` Kevin Buettner
2002-12-05 16:56 ` Kevin Buettner
2002-11-26 15:03 Josh Martin
2002-12-09 18:56 Josh Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200209281723.g8SHNep09485@atoae450.abq.sc.philips.com \
--to=josh.martin@abq.sc.philips.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox