From: Andrew Cagney <ac131313@redhat.com>
To: Kevin Buettner <kevinb@redhat.com>, Eli Zaretskii <eliz@is.elta.co.il>
Cc: Jason Thorpe <thorpej@wasabisystems.com>,
Daniel Jacobowitz <drow@mvista.com>,
"Nathan J. Williams" <nathanw@wasabisystems.com>,
gdb-patches@sources.redhat.com
Subject: Deprecate IBM6000_TARGET; Was: [PATCH] IBM6000_TARGET is wrong for NetBSD/powerpc
Date: Wed, 03 Sep 2003 20:17:00 -0000 [thread overview]
Message-ID: <3F564C4B.1040500@redhat.com> (raw)
In-Reply-To: <1030828195354.ZM18258@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]
> On Aug 28, 12:44pm, Andrew Cagney wrote:
>
>
>> > I agree, but we're talking about a simple bug-fix for an existing target, where the multi-arch-correct solution is not all that clear, because...
>> >
>> > - re-arange tm-rs6000.h so that the define wasn't needed
>> > - move the define to nm-rs6000.h (sick but effective :-)
>> >
>> > ...it's an MI part of the debugger that is testing the define. How would you suggest modifying tm-rs6000.h to deal with this?
>
>>
>> Create an aix specific tm-rs6000.h, move the define to there and then
>> kill the #undef's. Given that this macro will be deleted rather than
>> multi-arched, moving [burrying] it to nm-rs6000.h (and zapping the
>> #undefine is easier).
>
>
> I agree that moving it to nm-rs6000.h is the way to go. I'm not terribly
> worried about cross-debugging scenarios with AIX as the target since
> I'm pretty sure that it never worked anyway.
>
> I just took a look at the places where IBM6000_TARGET are used. This
> code is _really_ ugly. E.g, anything vmap related in exec.c ought to
> be moved somewhere else, maybe xcoffsolib.c.
How's the attached? It deletes the #undef's, and moves a renamed
#define (DEPRECATED_IBM6000_TARGET) to the nm-rs6000.h file. (If you've
a better new name ... :-)
Eli, note that I tweaked the doco.
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 5808 bytes --]
2003-09-03 Andrew Cagney <cagney@redhat.com>
* config/rs6000/tm-rs6000.h (IBM6000_TARGET): Delete definition.
* config/rs6000/nm-rs6000.h (DEPRECATED_IBM6000_TARGET): Define.
* symfile.c (syms_from_objfile): Update.
(reread_symbols): `Update
* exec.c (exec_file_attach): Update.
(exec_file_attach): Update.
* config/powerpc/tm-nbsd.h: Delete #undef IBM6000_TARGET, revert
2003-08-29 change.
* config/powerpc/tm-linux.h: Delete #undef IBM6000_TARGET.
Index: doc/ChangeLog
2003-09-03 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Deprecate
IBM6000_TARGET. Mention that it implies an RS/6000 system and not
just target.
Index: exec.c
===================================================================
RCS file: /cvs/src/src/gdb/exec.c,v
retrieving revision 1.28
diff -u -r1.28 exec.c
--- exec.c 21 Jan 2003 19:43:47 -0000 1.28
+++ exec.c 3 Sep 2003 20:12:49 -0000
@@ -242,7 +242,7 @@
/* FIXME - This should only be run for RS6000, but the ifdef is a poor
way to accomplish. */
-#ifdef IBM6000_TARGET
+#ifdef DEPRECATED_IBM6000_TARGET
/* Setup initial vmap. */
map_vmap (exec_bfd, 0);
@@ -254,7 +254,7 @@
error ("\"%s\": can't find the file sections: %s",
scratch_pathname, bfd_errmsg (bfd_get_error ()));
}
-#endif /* IBM6000_TARGET */
+#endif /* DEPRECATED_IBM6000_TARGET */
if (build_section_table (exec_bfd, &exec_ops.to_sections,
&exec_ops.to_sections_end))
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.102
diff -u -r1.102 symfile.c
--- symfile.c 17 Aug 2003 22:33:08 -0000 1.102
+++ symfile.c 3 Sep 2003 20:12:51 -0000
@@ -710,7 +710,7 @@
init_objfile_sect_indices (objfile);
}
-#ifndef IBM6000_TARGET
+#ifndef DEPRECATED_IBM6000_TARGET
/* This is a SVR4/SunOS specific hack, I think. In any event, it
screws RS/6000. sym_offsets should be doing this sort of thing,
because it knows the mapping between bfd sections and
@@ -758,7 +758,7 @@
s->offset += s_addr;
}
}
-#endif /* not IBM6000_TARGET */
+#endif /* not DEPRECATED_IBM6000_TARGET */
(*objfile->sf->sym_read) (objfile, mainline);
@@ -1861,7 +1861,7 @@
{
if (objfile->obfd)
{
-#ifdef IBM6000_TARGET
+#ifdef DEPRECATED_IBM6000_TARGET
/* If this object is from a shared library, then you should
stat on the library name, not member name. */
Index: config/powerpc/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/tm-linux.h,v
retrieving revision 1.13
diff -u -r1.13 tm-linux.h
--- config/powerpc/tm-linux.h 12 Jun 2003 23:58:07 -0000 1.13
+++ config/powerpc/tm-linux.h 3 Sep 2003 20:12:51 -0000
@@ -44,10 +44,6 @@
at_subroutine_call_instruction_target(prevpc,stoppc)
extern int at_subroutine_call_instruction_target();
-/* We _want_ the SVR4 section offset calculations (see syms_from_objfile()
- in symfile.c) */
-#undef IBM6000_TARGET
-
extern int ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name);
#undef IN_SIGTRAMP
#define IN_SIGTRAMP(pc,func_name) ppc_linux_in_sigtramp (pc,func_name)
Index: config/powerpc/tm-nbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/tm-nbsd.h,v
retrieving revision 1.3
diff -u -r1.3 tm-nbsd.h
--- config/powerpc/tm-nbsd.h 28 Aug 2003 14:44:14 -0000 1.3
+++ config/powerpc/tm-nbsd.h 3 Sep 2003 20:12:51 -0000
@@ -23,8 +23,4 @@
#include "powerpc/tm-ppc-eabi.h"
-/* We _want_ the SVR4 section offset calculations (see syms_from_objfile()
- in symfile.c). */
-#undef IBM6000_TARGET
-
#endif /* TM_NBSD_H */
Index: config/rs6000/nm-rs6000.h
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/nm-rs6000.h,v
retrieving revision 1.9
diff -u -r1.9 nm-rs6000.h
--- config/rs6000/nm-rs6000.h 1 Nov 2001 16:17:08 -0000 1.9
+++ config/rs6000/nm-rs6000.h 3 Sep 2003 20:12:51 -0000
@@ -64,3 +64,6 @@
#define KERNEL_U_SIZE kernel_u_size()
extern int kernel_u_size (void);
+
+/* Flag for machine-specific stuff in shared files. FIXME */
+#define DEPRECATED_IBM6000_TARGET
Index: config/rs6000/tm-rs6000.h
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/tm-rs6000.h,v
retrieving revision 1.25
diff -u -r1.25 tm-rs6000.h
--- config/rs6000/tm-rs6000.h 12 Apr 2003 17:41:26 -0000 1.25
+++ config/rs6000/tm-rs6000.h 3 Sep 2003 20:12:51 -0000
@@ -90,9 +90,6 @@
extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
#define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_noop (fromleaf, prev))
-/* Flag for machine-specific stuff in shared files. FIXME */
-#define IBM6000_TARGET
-
/* RS6000/AIX does not support PT_STEP. Has to be simulated. */
#define SOFTWARE_SINGLE_STEP_P() 1
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.159
diff -u -r1.159 gdbint.texinfo
--- doc/gdbint.texinfo 18 Aug 2003 20:04:56 -0000 1.159
+++ doc/gdbint.texinfo 3 Sep 2003 20:12:54 -0000
@@ -3382,9 +3382,9 @@
Define this if you need to supply your own definition for the function
@code{DEPRECATED_GET_SAVED_REGISTER}.
-@item IBM6000_TARGET
-@findex IBM6000_TARGET
-Shows that we are configured for an IBM RS/6000 target. This
+@item DEPRECATED_IBM6000_TARGET
+@findex DEPRECATED_IBM6000_TARGET
+Shows that we are configured for an IBM RS/6000 system. This
conditional should be eliminated (FIXME) and replaced by
feature-specific macros. It was introduced in a haste and we are
repenting at leisure.
next prev parent reply other threads:[~2003-09-03 20:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-14 22:13 Nathan J. Williams
2003-08-28 14:24 ` Daniel Jacobowitz
2003-08-28 14:38 ` Jason Thorpe
2003-08-28 14:44 ` Daniel Jacobowitz
2003-08-28 15:39 ` Andrew Cagney
2003-08-28 16:10 ` Jason Thorpe
2003-08-28 16:44 ` Andrew Cagney
2003-08-28 19:54 ` Kevin Buettner
2003-09-03 20:17 ` Andrew Cagney [this message]
2003-09-03 20:25 ` Deprecate IBM6000_TARGET; Was: " Kevin Buettner
2003-09-03 20:57 ` Andrew Cagney
2003-09-03 21:15 ` Jason Thorpe
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=3F564C4B.1040500@redhat.com \
--to=ac131313@redhat.com \
--cc=drow@mvista.com \
--cc=eliz@is.elta.co.il \
--cc=gdb-patches@sources.redhat.com \
--cc=kevinb@redhat.com \
--cc=nathanw@wasabisystems.com \
--cc=thorpej@wasabisystems.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