From: Andrew Cagney <cagney@gnu.org>
To: Randolph Chung <randolph@tausq.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/commit] Fix nested header include in infttrace.h
Date: Wed, 26 May 2004 19:29:00 -0000 [thread overview]
Message-ID: <40B4F027.7060908@gnu.org> (raw)
In-Reply-To: <20040526165722.GB7207@tausq.org>
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
next prev parent reply other threads:[~2004-05-26 19:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-26 15:41 Randolph Chung
2004-05-26 16:48 ` Andrew Cagney
2004-05-26 16:57 ` Randolph Chung
2004-05-26 19:29 ` Andrew Cagney [this message]
2004-06-07 18:04 ` Andrew Cagney
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=40B4F027.7060908@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=randolph@tausq.org \
/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