From: Randolph Chung <randolph@tausq.org>
To: gdb-patches@sources.redhat.com
Subject: [RFA] hpread.c cleanups
Date: Wed, 01 Mar 2006 05:58:00 -0000 [thread overview]
Message-ID: <4405380F.2090202@tausq.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 480 bytes --]
The hppa target used to use a objfile private field to store some shared
object information on HPUX. Most of that have been cleaned up, but there
is one more instance in hpread.c. In fact, the current code in cvs will
cause a crash because the objfile private field is not initialized. The
patch changes hpread.c to use the solist interface. Tested lightly on
hppa64-hp-hpux11.11. OK?
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
[-- Attachment #2: hpread.diff --]
[-- Type: text/plain, Size: 2651 bytes --]
2006-03-01 Randolph Chung <tausq@debian.org>
* hpread.c (hpread_process_one_debug_symbol): Use solist interface to
retrieve shared object information.
* hppa-tdep.h (hppa_objfile_private): Remove unused so_info field.
* Makefile.in (hpread.o): Update dependencies.
Index: hpread.c
===================================================================
RCS file: /cvs/src/src/gdb/hpread.c,v
retrieving revision 1.58
diff -u -p -r1.58 hpread.c
--- hpread.c 17 Dec 2005 22:34:01 -0000 1.58
+++ hpread.c 1 Mar 2006 05:52:14 -0000
@@ -36,6 +36,7 @@
#include "gdbtypes.h"
#include "demangle.h"
#include "solib-som.h"
+#include "solist.h"
#include "gdb_assert.h"
#include "hppa-tdep.h"
@@ -5764,13 +5765,9 @@ hpread_process_one_debug_symbol (union d
*/
struct so_list *so;
struct hppa_objfile_private *priv;
+ struct target_so_ops *ops = current_target_so_ops;
- priv = (struct hppa_objfile_private *)
- objfile_data (objfile, hppa_objfile_priv_data);
- if (priv == NULL)
- error (_("Internal error in reading shared library information."));
-
- so = ((struct hppa_objfile_private *) priv)->so_info;
+ so = ops->current_sos ();
if (so == NULL)
error (_("Internal error in reading shared library information."));
Index: hppa-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.h,v
retrieving revision 1.26
diff -u -p -r1.26 hppa-tdep.h
--- hppa-tdep.h 1 Mar 2006 05:43:03 -0000 1.26
+++ hppa-tdep.h 1 Mar 2006 05:52:14 -0000
@@ -211,7 +211,6 @@ struct hppa_unwind_info
struct hppa_objfile_private
{
struct hppa_unwind_info *unwind_info; /* a pointer */
- struct so_list *so_info; /* a pointer */
CORE_ADDR dp;
int dummy_call_sequence_reg;
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.789
diff -u -p -r1.789 Makefile.in
--- Makefile.in 28 Feb 2006 22:38:03 -0000 1.789
+++ Makefile.in 1 Mar 2006 05:55:07 -0000
@@ -2039,7 +2039,8 @@ hppa-tdep.o: hppa-tdep.c $(defs_h) $(bfd
hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \
$(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \
$(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \
- $(solib_som_h) $(gdb_assert_h) $(hppa_tdep_h) $(gdb_string_h)
+ $(solib_som_h) $(gdb_assert_h) $(hppa_tdep_h) $(gdb_string_h) \
+ $(solist_h)
hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
$(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) \
$(hppa_tdep_h)
next reply other threads:[~2006-03-01 5:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-01 5:58 Randolph Chung [this message]
2006-03-01 17:30 ` Daniel Jacobowitz
2006-03-27 0:35 ` Randolph Chung
2006-03-01 21:02 ` Kevin Buettner
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=4405380F.2090202@tausq.org \
--to=randolph@tausq.org \
--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