From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2358 invoked by alias); 3 Sep 2003 20:17:21 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 2346 invoked from network); 3 Sep 2003 20:17:19 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 3 Sep 2003 20:17:19 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 207FD2B7F; Wed, 3 Sep 2003 16:17:15 -0400 (EDT) Message-ID: <3F564C4B.1040500@redhat.com> Date: Wed, 03 Sep 2003 20:17:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Buettner , Eli Zaretskii Cc: Jason Thorpe , Daniel Jacobowitz , "Nathan J. Williams" , gdb-patches@sources.redhat.com Subject: Deprecate IBM6000_TARGET; Was: [PATCH] IBM6000_TARGET is wrong for NetBSD/powerpc References: <1BD6D35A-D972-11D7-BD43-000A957650EC@wasabisystems.com> <3F4E3168.9060908@redhat.com> <1030828195354.ZM18258@localhost.localdomain> Content-Type: multipart/mixed; boundary="------------010001080102070809000900" X-SW-Source: 2003-09/txt/msg00022.txt.bz2 This is a multi-part message in MIME format. --------------010001080102070809000900 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1326 > 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 --------------010001080102070809000900 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 5808 2003-09-03 Andrew Cagney * 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 * 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. --------------010001080102070809000900--