* [patch/commit] Fix nested header include in infttrace.h @ 2004-05-26 15:41 Randolph Chung 2004-05-26 16:48 ` Andrew Cagney 0 siblings, 1 reply; 5+ messages in thread From: Randolph Chung @ 2004-05-26 15:41 UTC (permalink / raw) To: gdb-patches infttrace.h was including target.h, which caused a lot of compile warnings related to duplicate defines of PC_REQUIRES_RUN_BEFORE_USE. this fixes it. commited as obvious. thx randolph 2004-05-26 Randolph Chung <tausq@debian.org> * infttrace.h (target_waitkind): Forward declare type instead of pulling in header file. Index: infttrace.h =================================================================== RCS file: /cvs/src/src/gdb/infttrace.h,v retrieving revision 1.3 diff -u -p -r1.3 infttrace.h --- infttrace.h 6 Apr 2004 18:29:10 -0000 1.3 +++ infttrace.h 26 May 2004 15:34:24 -0000 @@ -22,7 +22,7 @@ #ifndef INFTTRACE_H #define INFTTRACE_H -#include "target.h" /* For enum target_waitkind. */ +enum target_waitkind; extern int parent_attach_all (int, PTRACE_ARG3_TYPE, int); extern pid_t hppa_switched_threads (pid_t gdb_pid); -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch/commit] Fix nested header include in infttrace.h 2004-05-26 15:41 [patch/commit] Fix nested header include in infttrace.h Randolph Chung @ 2004-05-26 16:48 ` Andrew Cagney 2004-05-26 16:57 ` Randolph Chung 0 siblings, 1 reply; 5+ messages in thread From: Andrew Cagney @ 2004-05-26 16:48 UTC (permalink / raw) To: Randolph Chung; +Cc: gdb-patches infttrace.h was including target.h, which caused a lot of compile warnings related to duplicate defines of PC_REQUIRES_RUN_BEFORE_USE. this fixes it. commited as obvious. thx randolph 2004-05-26 Randolph Chung <tausq@debian.org> * infttrace.h (target_waitkind): Forward declare type instead of pulling in header file. Unfortunatly this is a GCC extension. It sounds like a header file is missing: #ifndef FOO_H #define FOO_H #endif wrappers? Adding them is ``obvious''. Andrew Index: infttrace.h =================================================================== RCS file: /cvs/src/src/gdb/infttrace.h,v retrieving revision 1.3 diff -u -p -r1.3 infttrace.h --- infttrace.h 6 Apr 2004 18:29:10 -0000 1.3 +++ infttrace.h 26 May 2004 15:34:24 -0000 @@ -22,7 +22,7 @@ #ifndef INFTTRACE_H #define INFTTRACE_H -#include "target.h" /* For enum target_waitkind. */ +enum target_waitkind; extern int parent_attach_all (int, PTRACE_ARG3_TYPE, int); extern pid_t hppa_switched_threads (pid_t gdb_pid); -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch/commit] Fix nested header include in infttrace.h 2004-05-26 16:48 ` Andrew Cagney @ 2004-05-26 16:57 ` Randolph Chung 2004-05-26 19:29 ` Andrew Cagney 0 siblings, 1 reply; 5+ messages in thread From: Randolph Chung @ 2004-05-26 16:57 UTC (permalink / raw) To: Andrew Cagney; +Cc: gdb-patches > Unfortunatly this is a GCC extension. It sounds like a header file is really?! wow... fwiw, this works with the ANSI C hp compiler too, and hpux is the only thing that uses infttrace.h .... > missing: > #ifndef FOO_H > #define FOO_H > #endif > wrappers? Adding them is ``obvious''. no, it's not that... this brings in target.h "too early", so that when a C file tries to include tm.h, we cannot override some #defines. the alternative is: +#undef PC_REQUIRES_RUN_BEFORE_USE #define PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc) in config/pa/tm-hppa.h. randolph -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch/commit] Fix nested header include in infttrace.h 2004-05-26 16:57 ` Randolph Chung @ 2004-05-26 19:29 ` Andrew Cagney 2004-06-07 18:04 ` Andrew Cagney 0 siblings, 1 reply; 5+ messages in thread From: Andrew Cagney @ 2004-05-26 19:29 UTC (permalink / raw) To: Randolph Chung; +Cc: gdb-patches Unfortunatly this is a GCC extension. It sounds like a header file is really?! wow... fwiw, this works with the ANSI C hp compiler too, and hpux is the only thing that uses infttrace.h .... missing: #ifndef FOO_H #define FOO_H #endif wrappers? Adding them is ``obvious''. no, it's not that... this brings in target.h "too early", so that when a C file tries to include tm.h, we cannot override some #defines. bleugh! the alternative is: +#undef PC_REQUIRES_RUN_BEFORE_USE #define PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc) Try the attached. Andrew 2004-05-26 Andrew Cagney <cagney@gnu.org> * target.h (PC_REQUIRES_RUN_BEFORE_USE): Delete definition. * config/pa/tm-hppa.h (DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE): Rename PC_REQUIRES_RUN_BEFORE_USE. * breakpoint.c (breakpoint_sals_to_pc): Update. Wrap reference in #ifdef. Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.173 diff -p -u -r1.173 breakpoint.c --- breakpoint.c 13 May 2004 16:39:10 -0000 1.173 +++ breakpoint.c 26 May 2004 19:28:09 -0000 @@ -5025,7 +5025,8 @@ breakpoint_sals_to_pc (struct symtabs_an Give the target a chance to bless sals.sals[i].pc before we try to make a breakpoint for it. */ - if (PC_REQUIRES_RUN_BEFORE_USE (sals->sals[i].pc)) +#ifdef DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE + if (DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE (sals->sals[i].pc)) { if (address == NULL) error ("Cannot break without a running program."); @@ -5033,6 +5034,7 @@ breakpoint_sals_to_pc (struct symtabs_an error ("Cannot break on %s without a running program.", address); } +#endif } } Index: target.h =================================================================== RCS file: /cvs/src/src/gdb/target.h,v retrieving revision 1.59 diff -p -u -r1.59 target.h --- target.h 25 May 2004 14:58:31 -0000 1.59 +++ target.h 26 May 2004 19:28:12 -0000 @@ -1088,15 +1088,6 @@ extern void (*deprecated_target_new_objf (*current_target.to_stopped_data_address) () #endif -/* Sometimes gdb may pick up what appears to be a valid target address - from a minimal symbol, but the value really means, essentially, - "This is an index into a table which is populated when the inferior - is run. Therefore, do not attempt to use this as a PC." */ - -#if !defined(PC_REQUIRES_RUN_BEFORE_USE) -#define PC_REQUIRES_RUN_BEFORE_USE(pc) (0) -#endif - /* This will only be defined by a target that supports catching vfork events, such as HP-UX. Index: config/pa/tm-hppa.h =================================================================== RCS file: /cvs/src/src/gdb/config/pa/tm-hppa.h,v retrieving revision 1.73 diff -p -u -r1.73 tm-hppa.h --- config/pa/tm-hppa.h 7 May 2004 05:48:50 -0000 1.73 +++ config/pa/tm-hppa.h 26 May 2004 19:28:12 -0000 @@ -29,7 +29,7 @@ #define GDB_MULTI_ARCH 1 extern int hppa_pc_requires_run_before_use (CORE_ADDR pc); -#define PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc) +#define DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc) /* PA specific macro to see if the current instruction is nullified. */ #ifndef INSTRUCTION_NULLIFIED From cagney@gnu.org Wed May 26 19:53:00 2004 From: Andrew Cagney <cagney@gnu.org> To: Jerome Guitton <guitton@act-europe.fr> Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] win32: bfd_cache_close after kill Date: Wed, 26 May 2004 19:53:00 -0000 Message-id: <40B4F5A2.9000708@gnu.org> References: <20040524115048.GA27758@act-europe.fr> <20040525102414.GA28823@act-europe.fr> X-SW-Source: 2004-05/msg00756.html Content-length: 509 + + /* Release file handles in BFD. */ + ALL_OBJFILES (obj) + { + if (obj->obfd) + bfd_cache_close (obj->obfd); + } + bfd_cache_close (exec_bfd); Hmm, unstead of waiting until kill should GDB simply do this when finished processing each objfile? Users also complain that they can't rebuild their executable while GDB is debugging. BFD might also be ok with a new bfd_cache_close_all (void) method - simplify the code needed to do the close letting us put calls in more places. Andrew ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch/commit] Fix nested header include in infttrace.h 2004-05-26 19:29 ` Andrew Cagney @ 2004-06-07 18:04 ` Andrew Cagney 0 siblings, 0 replies; 5+ messages in thread From: Andrew Cagney @ 2004-06-07 18:04 UTC (permalink / raw) To: Andrew Cagney; +Cc: Randolph Chung, gdb-patches > 2004-05-26 Andrew Cagney <cagney@gnu.org> > > * target.h (PC_REQUIRES_RUN_BEFORE_USE): Delete definition. > * config/pa/tm-hppa.h (DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE): > Rename PC_REQUIRES_RUN_BEFORE_USE. > * breakpoint.c (breakpoint_sals_to_pc): Update. Wrap reference in > #ifdef. I've checked this in. Andrew > Index: breakpoint.c > =================================================================== > RCS file: /cvs/src/src/gdb/breakpoint.c,v > retrieving revision 1.173 > diff -p -u -r1.173 breakpoint.c > --- breakpoint.c 13 May 2004 16:39:10 -0000 1.173 > +++ breakpoint.c 26 May 2004 19:28:09 -0000 > @@ -5025,7 +5025,8 @@ breakpoint_sals_to_pc (struct symtabs_an > > Give the target a chance to bless sals.sals[i].pc before we > try to make a breakpoint for it. */ > - if (PC_REQUIRES_RUN_BEFORE_USE (sals->sals[i].pc)) > +#ifdef DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE > + if (DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE (sals->sals[i].pc)) > { > if (address == NULL) > error ("Cannot break without a running program."); > @@ -5033,6 +5034,7 @@ breakpoint_sals_to_pc (struct symtabs_an > error ("Cannot break on %s without a running program.", > address); > } > +#endif > } > } > > Index: target.h > =================================================================== > RCS file: /cvs/src/src/gdb/target.h,v > retrieving revision 1.59 > diff -p -u -r1.59 target.h > --- target.h 25 May 2004 14:58:31 -0000 1.59 > +++ target.h 26 May 2004 19:28:12 -0000 > @@ -1088,15 +1088,6 @@ extern void (*deprecated_target_new_objf > (*current_target.to_stopped_data_address) () > #endif > > -/* Sometimes gdb may pick up what appears to be a valid target address > - from a minimal symbol, but the value really means, essentially, > - "This is an index into a table which is populated when the inferior > - is run. Therefore, do not attempt to use this as a PC." */ > - > -#if !defined(PC_REQUIRES_RUN_BEFORE_USE) > -#define PC_REQUIRES_RUN_BEFORE_USE(pc) (0) > -#endif > - > /* This will only be defined by a target that supports catching vfork events, > such as HP-UX. > > Index: config/pa/tm-hppa.h > =================================================================== > RCS file: /cvs/src/src/gdb/config/pa/tm-hppa.h,v > retrieving revision 1.73 > diff -p -u -r1.73 tm-hppa.h > --- config/pa/tm-hppa.h 7 May 2004 05:48:50 -0000 1.73 > +++ config/pa/tm-hppa.h 26 May 2004 19:28:12 -0000 > @@ -29,7 +29,7 @@ > #define GDB_MULTI_ARCH 1 > > extern int hppa_pc_requires_run_before_use (CORE_ADDR pc); > -#define PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc) > +#define DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc) > > /* PA specific macro to see if the current instruction is nullified. */ > #ifndef INSTRUCTION_NULLIFIED ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-06-07 18:04 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-05-26 15:41 [patch/commit] Fix nested header include in infttrace.h Randolph Chung 2004-05-26 16:48 ` Andrew Cagney 2004-05-26 16:57 ` Randolph Chung 2004-05-26 19:29 ` Andrew Cagney 2004-06-07 18:04 ` Andrew Cagney
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox