* thumb_skip_prologue too adventurous
@ 2000-03-18 14:14 Jonathan Larmour
[not found] ` <38D40052.AF731E81@redhat.co.uk>
2000-04-01 0:00 ` Jonathan Larmour
0 siblings, 2 replies; 4+ messages in thread
From: Jonathan Larmour @ 2000-03-18 14:14 UTC (permalink / raw)
To: fnasser; +Cc: gdb-patches
Hi Fernando,
You checked in the following change to arm-tdep.c:
revision 1.46
date: 2000/01/28 15:32:04; author: fnasser; state: Exp; lines: +84 -22
2000-01-28 Fernando Nasser <fnasser@totem.to.cygnus.com>
* arm-tdep.c (thumb_skip_prologue, thumb_scan_prologue): Add
support for new style thumb prologues.
However this has broken small functions, e.g. void foo() { for (;;); } etc.
because such functions contain no prologue. e.g. for foo(), there is only
one instruction which is a branch to itself. However thumb_skip_prologue
will continue past the end of this small function and into the next one.
Thus breakpoints, etc. get set in completely the wrong place.
The essential issue is that thumb_skip_prologue must not be allowed to
continue on after the end of the function, even if it hasn't found the
prologue.
The attached patch certainly fixes things for me, but I'm not sure if it's
the right answer. If it is, please check it in; if not, tell me what I
should do :-).
Thanks,
Jifl
2000-03-18 Jonathan Larmour <jlarmour@redhat.co.uk>
* arm-tdep.c (thumb_skip_prologue): Take function end addr argument
so that we can stop searching for the prologue past the function end
(arm_skip_prologue): Call thumb_skip_prologue with function end addr
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault
From jlarmour@redhat.co.uk Sat Mar 18 14:17:00 2000
From: Jonathan Larmour <jlarmour@redhat.co.uk>
To: fnasser@redhat.com, gdb-patches@sourceware.cygnus.com
Subject: Re: thumb_skip_prologue too adventurous
Date: Sat, 18 Mar 2000 14:17:00 -0000
Message-id: <38D40052.AF731E81@redhat.co.uk>
References: <38D3FFC8.32082A85@redhat.co.uk>
X-SW-Source: 2000-03/msg00331.html
Content-length: 1896
Jonathan Larmour wrote:
> 2000-03-18 Jonathan Larmour <jlarmour@redhat.co.uk>
>
> * arm-tdep.c (thumb_skip_prologue): Take function end addr argument
> so that we can stop searching for the prologue past the function end
> (arm_skip_prologue): Call thumb_skip_prologue with function end addr
Doh! Patch attached.
Jifl
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.4
diff -u -5 -p -r1.4 arm-tdep.c
--- arm-tdep.c 2000/02/29 07:23:02 1.4
+++ arm-tdep.c 2000/03/18 22:16:21
@@ -326,20 +326,20 @@ arm_frameless_function_invocation (struc
When we have found at least one of each class we are done with the prolog.
Note that the "sub sp, #NN" before the push does not count.
*/
static CORE_ADDR
-thumb_skip_prologue (CORE_ADDR pc)
+thumb_skip_prologue (CORE_ADDR pc, CORE_ADDR func_end)
{
CORE_ADDR current_pc;
int findmask = 0; /* findmask:
bit 0 - push { rlist }
bit 1 - mov r7, sp OR add r7, sp, #imm (setting of r7)
bit 2 - sub sp, #simm OR add sp, #simm (adjusting of sp)
*/
- for (current_pc = pc; current_pc < pc + 40; current_pc += 2)
+ for (current_pc = pc; current_pc + 2 < func_end && current_pc < pc + 40; current_pc += 2)
{
unsigned short insn = read_memory_unsigned_integer (current_pc, 2);
if ((insn & 0xfe00) == 0xb400) /* push { rlist } */
{
@@ -397,11 +397,11 @@ arm_skip_prologue (CORE_ADDR pc)
return sal.end;
}
/* Check if this is Thumb code. */
if (arm_pc_is_thumb (pc))
- return thumb_skip_prologue (pc);
+ return thumb_skip_prologue (pc, func_end);
/* Can't find the prologue end in the symbol table, try it the hard way
by disassembling the instructions. */
skip_pc = pc;
inst = read_memory_integer (skip_pc, 4);
From eliz@delorie.com Sat Mar 18 14:26:00 2000
From: Eli Zaretskii <eliz@delorie.com>
To: phdm@macqel.be
Cc: ezannoni@cygnus.com, ac131313@cygnus.com, gdb-patches@sourceware.cygnus.com
Subject: Re: HAVE_POLL is not enough - RFA
Date: Sat, 18 Mar 2000 14:26:00 -0000
Message-id: <200003182226.RAA07052@indy.delorie.com>
References: <200003181028.LAA30913@mail.macqel.be>
X-SW-Source: 2000-03/msg00332.html
Content-length: 9200
> I implemented the runtime poll/select selection. The patch seems
> huge because of the indentation changes caused by replacing
>
> #if HAVE_POLL
> some_code
> #else
> some_other_code
> #endif
>
> by
>
> #if HAVE_POLL
> if (!use_select)
> {
> some_code
> }
> else
> #endif
> {
> some_other_code
> }
>
> I have tested it on m68k-motorola-sysv and powerpc-ibm-aix4.1.5.0
>
> OK to apply ?
This patch clashes with the changes I sent for the select branch,
whose goal is to use the standard FD_* macros instead of fiddling with
the individual bits (which is both unnecessary and non-portable). I
reproduce my patch below. The references can be found here:
http://sourceware.cygnus.com/ml/gdb/2000-q1/msg00358.html
Btw, Elena, what's up with this patch? Why wasn't it commited? Can I
commit it?
2000-03-04 Eli Zaretskii <eliz@is.elta.co.il>
* event-loop.c (top-level) [NO_FD_SET]: Deprecate this branch.
Print an error at compile time if we are to use select, but FD_SET
is not available.
(SELECT_MASK, NBBY, FD_SETSIZE, NFDBITS, MASK_SIZE): Define only
if HAVE_POLL is not defined and NO_FD_SET *is* defined.
(create_file_handler) [!HAVE_POLL]: Use FD_SET and FD_CLR.
(delete_file_handler) [!HAVE_POLL]: Use FD_CLR and FD_ISSET.
(gdb_wait_for_event) [!HAVE_POLL]: Copy fd_set sets directly
instead of using memcpy and memset. Use FD_ISSET.
* config/i386/xm-go32.h (fd_mask): Remove typedef.
--- gdb/event-loop.c~0 Mon Feb 21 18:17:16 2000
+++ gdb/event-loop.c Sat Mar 4 14:28:38 2000
@@ -27,6 +27,7 @@
#include <poll.h>
#else
#include <sys/types.h>
+#include <string.h>
#endif
#include <errno.h>
#include <setjmp.h>
@@ -34,9 +35,14 @@
/* Type of the mask arguments to select. */
-#ifndef NO_FD_SET
-#define SELECT_MASK fd_set
-#else
+#ifndef HAVE_POLL
+#ifdef NO_FD_SET
+/* All this stuff below is not required if select is used as God(tm)
+ intended, with the FD_* macros. Are there any implementations of
+ select which don't have FD_SET and other standard FD_* macros? I
+ don't think there are, but if I'm wrong, we need to catch them. */
+#error FD_SET must be defined if select function is to be used!
+
#ifndef _AIX
typedef long fd_mask;
#endif
@@ -44,8 +50,7 @@ typedef long fd_mask;
#define SELECT_MASK void
#else
#define SELECT_MASK int
-#endif
-#endif
+#endif /* !_IBMR2 */
/* Define "NBBY" (number of bits per byte) if it's not already defined. */
@@ -53,7 +58,6 @@ typedef long fd_mask;
#define NBBY 8
#endif
-
/* Define the number of fd_masks in an fd_set */
#ifndef FD_SETSIZE
@@ -71,6 +75,9 @@ typedef long fd_mask;
#endif
#define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)
+#endif /* NO_FD_SET */
+#endif /* !HAVE_POLL */
+
typedef struct gdb_event gdb_event;
typedef void (event_handler_func) (int);
@@ -192,10 +199,10 @@ static struct
/* Masks to be used in the next call to select.
Bits are set in response to calls to create_file_handler. */
- fd_mask check_masks[3 * MASK_SIZE];
+ fd_set check_masks[3];
/* What file descriptors were found ready by select. */
- fd_mask ready_masks[3 * MASK_SIZE];
+ fd_set ready_masks[3];
/* Number of valid bits (highest fd value + 1). */
int num_fds;
@@ -487,10 +494,6 @@ create_file_handler (int fd, int mask, h
{
file_handler *file_ptr;
-#ifndef HAVE_POLL
- int index, bit;
-#endif
-
/* Do we already have a file handler for this file? (We may be
changing its associated procedure). */
for (file_ptr = gdb_notifier.first_file_handler; file_ptr != NULL;
@@ -532,23 +535,20 @@ create_file_handler (int fd, int mask, h
#else /* ! HAVE_POLL */
- index = fd / (NBBY * sizeof (fd_mask));
- bit = 1 << (fd % (NBBY * sizeof (fd_mask)));
-
if (mask & GDB_READABLE)
- gdb_notifier.check_masks[index] |= bit;
+ FD_SET (fd, &gdb_notifier.check_masks[0]);
else
- gdb_notifier.check_masks[index] &= ~bit;
+ FD_CLR (fd, &gdb_notifier.check_masks[0]);
if (mask & GDB_WRITABLE)
- (gdb_notifier.check_masks + MASK_SIZE)[index] |= bit;
+ FD_SET (fd, &gdb_notifier.check_masks[1]);
else
- (gdb_notifier.check_masks + MASK_SIZE)[index] &= ~bit;
+ FD_CLR (fd, &gdb_notifier.check_masks[1]);
if (mask & GDB_EXCEPTION)
- (gdb_notifier.check_masks + 2 * (MASK_SIZE))[index] |= bit;
+ FD_SET (fd, &gdb_notifier.check_masks[2]);
else
- (gdb_notifier.check_masks + 2 * (MASK_SIZE))[index] &= ~bit;
+ FD_CLR (fd, &gdb_notifier.check_masks[2]);
if (gdb_notifier.num_fds <= fd)
gdb_notifier.num_fds = fd + 1;
@@ -562,11 +562,10 @@ void
delete_file_handler (int fd)
{
file_handler *file_ptr, *prev_ptr = NULL;
- int i, j;
+ int i;
+#ifdef HAVE_POLL
+ int j
struct pollfd *new_poll_fds;
-#ifndef HAVE_POLL
- int index, bit;
- unsigned long flags;
#endif
/* Find the entry for the given file. */
@@ -604,36 +603,26 @@ delete_file_handler (int fd)
#else /* ! HAVE_POLL */
- index = fd / (NBBY * sizeof (fd_mask));
- bit = 1 << (fd % (NBBY * sizeof (fd_mask)));
-
if (file_ptr->mask & GDB_READABLE)
- gdb_notifier.check_masks[index] &= ~bit;
+ FD_CLR (fd, &gdb_notifier.check_masks[0]);
if (file_ptr->mask & GDB_WRITABLE)
- (gdb_notifier.check_masks + MASK_SIZE)[index] &= ~bit;
+ FD_CLR (fd, &gdb_notifier.check_masks[1]);
if (file_ptr->mask & GDB_EXCEPTION)
- (gdb_notifier.check_masks + 2 * (MASK_SIZE))[index] &= ~bit;
+ FD_CLR (fd, &gdb_notifier.check_masks[2]);
/* Find current max fd. */
if ((fd + 1) == gdb_notifier.num_fds)
{
- for (gdb_notifier.num_fds = 0; index >= 0; index--)
+ gdb_notifier.num_fds--;
+ for (i = gdb_notifier.num_fds; i; i--)
{
- flags = gdb_notifier.check_masks[index]
- | (gdb_notifier.check_masks + MASK_SIZE)[index]
- | (gdb_notifier.check_masks + 2 * (MASK_SIZE))[index];
- if (flags)
- {
- for (i = (NBBY * sizeof (fd_mask)); i > 0; i--)
- {
- if (flags & (((unsigned long) 1) << (i - 1)))
- break;
- }
- gdb_notifier.num_fds = index * (NBBY * sizeof (fd_mask)) + i;
- break;
- }
+ if (FD_ISSET (i - 1, &gdb_notifier.check_masks[0])
+ || FD_ISSET (i - 1, &gdb_notifier.check_masks[1])
+ || FD_ISSET (i - 1, &gdb_notifier.check_masks[2]))
+ break;
}
+ gdb_notifier.num_fds = i;
}
#endif /* HAVE_POLL */
@@ -742,10 +731,8 @@ gdb_wait_for_event (void)
file_handler *file_ptr;
gdb_event *file_event_ptr;
int num_found = 0;
+#ifdef HAVE_POLL
int i;
-
-#ifndef HAVE_POLL
- int mask, bit, index;
#endif
/* Make sure all output is done before getting another event. */
@@ -767,20 +754,24 @@ gdb_wait_for_event (void)
perror_with_name ("Poll");
#else /* ! HAVE_POLL */
- memcpy (gdb_notifier.ready_masks,
- gdb_notifier.check_masks,
- 3 * MASK_SIZE * sizeof (fd_mask));
+
+ gdb_notifier.ready_masks[0] = gdb_notifier.check_masks[0];
+ gdb_notifier.ready_masks[1] = gdb_notifier.check_masks[1];
+ gdb_notifier.ready_masks[2] = gdb_notifier.check_masks[2];
+
num_found = select (gdb_notifier.num_fds,
- (SELECT_MASK *) & gdb_notifier.ready_masks[0],
- (SELECT_MASK *) & gdb_notifier.ready_masks[MASK_SIZE],
- (SELECT_MASK *) & gdb_notifier.ready_masks[2 * MASK_SIZE],
- gdb_notifier.timeout_valid ? &gdb_notifier.timeout : NULL);
+ & gdb_notifier.ready_masks[0],
+ & gdb_notifier.ready_masks[1],
+ & gdb_notifier.ready_masks[2],
+ gdb_notifier.timeout_valid
+ ? &gdb_notifier.timeout : NULL);
/* Clear the masks after an error from select. */
if (num_found == -1)
{
- memset (gdb_notifier.ready_masks,
- 0, 3 * MASK_SIZE * sizeof (fd_mask));
+ FD_ZERO (&gdb_notifier.ready_masks[0]);
+ FD_ZERO (&gdb_notifier.ready_masks[1]);
+ FD_ZERO (&gdb_notifier.ready_masks[2]);
/* Dont print anything is we got a signal, let gdb handle it. */
if (errno != EINTR)
perror_with_name ("Select");
@@ -821,19 +812,18 @@ gdb_wait_for_event (void)
}
#else /* ! HAVE_POLL */
+
for (file_ptr = gdb_notifier.first_file_handler;
(file_ptr != NULL) && (num_found > 0);
file_ptr = file_ptr->next_file)
{
- index = file_ptr->fd / (NBBY * sizeof (fd_mask));
- bit = 1 << (file_ptr->fd % (NBBY * sizeof (fd_mask)));
- mask = 0;
+ int mask = 0;
- if (gdb_notifier.ready_masks[index] & bit)
+ if (FD_ISSET (file_ptr->fd, &gdb_notifier.ready_masks[0]))
mask |= GDB_READABLE;
- if ((gdb_notifier.ready_masks + MASK_SIZE)[index] & bit)
+ if (FD_ISSET (file_ptr->fd, &gdb_notifier.ready_masks[1]))
mask |= GDB_WRITABLE;
- if ((gdb_notifier.ready_masks + 2 * (MASK_SIZE))[index] & bit)
+ if (FD_ISSET (file_ptr->fd, &gdb_notifier.ready_masks[2]))
mask |= GDB_EXCEPTION;
if (!mask)
@@ -851,6 +841,7 @@ gdb_wait_for_event (void)
}
file_ptr->ready_mask = mask;
}
+
#endif /* HAVE_POLL */
return 0;
--- gdb/config/i386/xm-go32.h~1 Fri Feb 18 18:18:44 2000
+++ gdb/config/i386/xm-go32.h Sat Mar 4 13:58:36 2000
@@ -36,4 +36,3 @@
#define DIRNAME_SEPARATOR ';'
#define HOST_I386
-typedef unsigned char fd_mask;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: thumb_skip_prologue too adventurous
[not found] ` <38D5064B.40AE9470@redhat.com>
@ 2000-03-19 12:29 ` Jonathan Larmour
2000-03-24 12:46 ` Jonathan Larmour
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Larmour @ 2000-03-19 12:29 UTC (permalink / raw)
To: Fernando Nasser; +Cc: gdb-patches
Fernando Nasser wrote:
> I am not sure if there isn't a better solution for this, but for now I
> would say that you should check your change in as an emergency fix.
I don't have checkin rights to the "src" repository, so I'd be grateful if
you could do this for me.
> I
> am assuming you ran the testsuite and it did not cause any regressions,
> right? (I don't think it will cause any)
Nope - no regressions.
> I may latter add another change to check first if there is information
> about the prologue end in the symbol table. I don't know why this was
> not checked before, I just noticed it now, looking at you patch.
Don't worry - it is checked, but it is done in arm_skip_prologue, before
thumb_skip_prologue is called.
> I wrote this thumb prologue scan code to match the new compiler (gcc)
> prologue generation. As everything is new, both Nick and I used the
> testsuite results to verify our work. The case you mention does not have
> a testsuite case. I wonder if you could add a test case?
I've never done a GDB testcase before, but here goes - I've attached one. It
runs at the end of break.exp. The complication is that we need to start
over, because the problematic programs are the ones compiled with
optimization. So we have to jump through all the same hoops as at the start
of the file. Some of this stuff might be overkill, but it definitely seems
to work.
I agree the addition of this test is A Good Thing as we've had these types
of problems before on other targets with optimized code.
Hope this helps. Obviously let me know if there are any problems with it.
Jifl
2000-03-19 Jonathan Larmour <jlarmour@redhat.co.uk>
* gdb.base/break.exp: Add new test for setting breakpoints on
optimized code so we can test breakpoints work even when function
prologues may be optimized away
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault
Index: gdb/testsuite/gdb.base/break.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/break.exp,v
retrieving revision 1.2
diff -u -5 -p -r1.2 break.exp
--- gdb/testsuite/gdb.base/break.exp 2000/02/16 00:11:07 1.2
+++ gdb/testsuite/gdb.base/break.exp 2000/03/19 20:26:34
@@ -799,10 +799,83 @@ proc test_next_with_recursion {} {
}
test_clear_command
test_next_with_recursion
+
+#********
+
+# build a new file with optimization enabled so that we can try breakpoints
+# on targets with optimized prologues
+
+set binfileo2 ${objdir}/${subdir}/${testfile}o2
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfileo2}" executable {debug additional_flags="-O2" }] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfileo2}] {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfileo2}
+
+if [target_info exists gdb_stub] {
+ gdb_step_for_stub;
+}
+
+#
+# test break at function
+#
+gdb_test "break main" \
+ "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "breakpoint function, optimized file"
+
+#
+# test break at function
+#
+gdb_test "break marker4" \
+ "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "breakpoint small function, optimized file"
+
+#
+# run until the breakpoint at main is hit. For non-stubs-using targets.
+#
+if ![target_info exists use_gdb_stub] {
+ if [istarget "*-*-vxworks*"] then {
+ send_gdb "run vxmain \"2\"\n"
+ set timeout 120
+ verbose "Timeout is now $timeout seconds" 2
+ } else {
+ send_gdb "run\n"
+ }
+ gdb_expect {
+ -re "The program .* has been started already.*y or n. $" {
+ send_gdb "y\n"
+ exp_continue
+ }
+ -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:75.*75\[\t \]+if .argc.* \{.*$gdb_prompt $"\
+ { pass "run until function breakpoint, optimized file" }
+ -re ".*$gdb_prompt $" { fail "run until function breakpoint, optimized file" }
+ timeout { fail "run until function breakpoint, optimized file (timeout)" }
+ }
+} else {
+ if ![target_info exists gdb_stub] {
+ gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:75.*75\[\t \]+if .argc.*\{.*" "stub continue, optimized file"
+ }
+}
+
+#
+# run until the breakpoint at a small function
+#
+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile:51.*51\[\t \]+void.*marker4.*" \
+ "run until breakpoint set at small function, optimized file"
+
+
# Reset the default arguments for VxWorks
if [istarget "*-*-vxworks*"] {
set timeout 10
verbose "Timeout is now $timeout seconds" 2
send_gdb "set args main\n"
From Peter.Schauer@regent.e-technik.tu-muenchen.de Sun Mar 19 13:08:00 2000
From: "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
To: eliz@delorie.com (Eli Zaretskii)
Cc: jimb@zwingli.cygnus.com, gdb-patches@sourceware.cygnus.com
Subject: Re: RFA: minor watchpoint code cleanup
Date: Sun, 19 Mar 2000 13:08:00 -0000
Message-id: <200003192107.WAA12743@reisser.regent.e-technik.tu-muenchen.de>
References: <200003190944.EAA07454@indy.delorie.com>
X-SW-Source: 2000-03/msg00349.html
Content-length: 1635
> While we are talking: someone (H.J. Lu?) suggested to make the
> watchpoint insertion code common to all x86 targets. What's the
> current say-so on this?
With Solaris x86 2.6 and beyond we can get an unlimited amount of watchpoints
with only a few restrictions via page fault handling, procfs and appropriate
Solaris kernel support.
I don't object to common watchpoint insertion code (using x86 debug registers)
for other x86 targets, but we should be able to override it via the tm/nm
config files.
My (currently experimental) version of config/nm-i386sol2.h has this:
#if defined (NEW_PROC_API)
/* Solaris supports procfs watchpoints starting with 2.6. */
#define TARGET_HAS_HARDWARE_WATCHPOINTS
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
/* When a hardware watchpoint fires off the PC will be left after the
instruction which caused the watchpoint. */
#define STOPPED_BY_WATCHPOINT(W) \
procfs_stopped_by_watchpoint(inferior_pid)
extern int procfs_stopped_by_watchpoint PARAMS ((int));
#define HAVE_CONTINUABLE_WATCHPOINT
#define CANNOT_STEP_HW_WATCHPOINTS
/* Use these macros for watchpoint insertion/deletion. */
/* TYPE is target_hw_bp_type. */
#define target_insert_watchpoint(ADDR, LEN, TYPE) \
procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 1)
#define target_remove_watchpoint(ADDR, LEN, TYPE) \
procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 1)
extern int procfs_set_watchpoint PARAMS ((int, CORE_ADDR, int, int, int));
#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1
#endif /* NEW_PROC_API */
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de
From kettenis@wins.uva.nl Sun Mar 19 14:36:00 2000
From: Mark Kettenis <kettenis@wins.uva.nl>
To: jimb@cygnus.com
Cc: msnyder@cygnus.com, ac131313@cygnus.com, gdb-patches@sourceware.cygnus.com
Subject: Re: RFA: Fix arguments passed to W_SETSTOP
Date: Sun, 19 Mar 2000 14:36:00 -0000
Message-id: <200003192236.e2JMaKs00612@delius.kettenis.local>
References: <38A12872.13D194C4@cygnus.com> <200002091429.e19ETk916570@delius.kettenis.local> <npog8d8e85.fsf_-_@zwingli.cygnus.com>
X-SW-Source: 2000-03/msg00350.html
Content-length: 245
From: Jim Blandy <jimb@cygnus.com>
Date: 17 Mar 2000 16:43:22 -0500
Looks like a careless cut and paste. Does this fix look right?
Sure that's what my origional patch did. Looks like Michael fiddled a
bit too much with it :-)
Mark
From kettenis@wins.uva.nl Sun Mar 19 14:48:00 2000
From: Mark Kettenis <kettenis@wins.uva.nl>
To: eliz@is.elta.co.il
Cc: jimb@zwingli.cygnus.com, kevinb@cygnus.com, gdb-patches@sourceware.cygnus.com
Subject: Re: Linux sigtramp detection code moved to its proper place
Date: Sun, 19 Mar 2000 14:48:00 -0000
Message-id: <200003192248.e2JMm1H00626@delius.kettenis.local>
References: <200003162241.RAA19616@zwingli.cygnus.com> <1000316225504.ZM3009@ocotillo.lan> <npsnxp8ix6.fsf@zwingli.cygnus.com> <200003182227.RAA07058@indy.delorie.com>
X-SW-Source: 2000-03/msg00351.html
Content-length: 1038
Date: Sat, 18 Mar 2000 17:27:44 -0500 (EST)
From: Eli Zaretskii <eliz@delorie.com>
> *** gdb/Makefile.in 2000/03/16 10:23:38 1.13
> --- gdb/Makefile.in 2000/03/17 19:59:40
> ***************
> *** 1063,1068 ****
> --- 1063,1069 ----
> i386-tdep.c i386b-nat.c i386mach-nat.c i386v-nat.c i386-linux-nat.c \
> i386aix-nat.c i386m3-nat.c i386v4-nat.c i386ly-tdep.c \
> i387-tdep.c \
> + i386-linux-tdep.c \
> i960-tdep.c \
> infptrace.c inftarg.c irix4-nat.c irix5-nat.c isi-xdep.c \
> lynx-nat.c m3-nat.c \
I see you already added the new file. Sigh... Is it possible to find
a different name for it, one which won't clash with i386-linux-nat.c?
How about i386linux-tdep.c, for example?
Yuck, that's ugly!
Is it really important that these Linux-specific files are correctly
extracted on MS-DOS? I believe your argument was about buggy tar
programs floating around, but I don't think it is too much too ask
people to fix their tar before trying to build GDB.
Mark
From kingdon@redhat.com Sun Mar 19 14:52:00 2000
From: Jim Kingdon <kingdon@redhat.com>
To: gdb-patches@sourceware.cygnus.com
Subject: make_cleanup_func elimination
Date: Sun, 19 Mar 2000 14:52:00 -0000
Message-id: <200003192252.RAA14902@devserv.devel.redhat.com>
X-SW-Source: 2000-03/msg00352.html
Content-length: 60783
This patch takes the advice of the comments in defs.h.
I did try a few testsuite runs without obvious disasters, but I needed
to re-do them to get completely good numbers, and I haven't been
getting around to that. So sending the patch in now seemed better
than just letting it sit around without telling anyone.
2000-03-13 Jim Kingdon <kingdon@redhat.com>
Fix dubious assumptions about sizes of host pointers and ints and
such in calling make_cleanup:
* coffread.c, solib.c, dbxread.c, mipsread.c, os9kread.c,
elfread.c, nlmread.c, somread.c, xcoffread.c, ax-gdb.c,
tracepoint.c, dwarf2read.c, command.c, eval.c, top.c, event-top.c,
top.h, breakpoint.h, breakpoint.c, infrun.c, infcmd.c, varobj.c,
parse.c, stack.c, printcmd.c, symfile.c, symtab.c, thread.c,
typeprint.c, valops.c, procfs.c, hp-psymtab-read.c, hppa-tdep.c,
sparcl-tdep.c, remote-udi.c, procfs.c, remote-e7000.c: Don't cast
argument to make_cleanup. Instead give the function we pass the
right argument type one way or another. In various cases change
argument types or add wrapper functions. In the case of bfd_close
(many places), close (procfs.c), closedir (procfs.c), chdir
(top.c), fclose (top.c), add error handling.
* defs.h (make_cleanup_func): Remove.
Index: ax-gdb.c
===================================================================
RCS file: /cvs/src/src/gdb/ax-gdb.c,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 ax-gdb.c
--- ax-gdb.c 2000/02/02 00:21:04 1.1.1.7
+++ ax-gdb.c 2000/03/19 21:58:04
@@ -1798,7 +1798,7 @@
struct agent_expr *ax = new_agent_expr (0);
union exp_element *pc;
- old_chain = make_cleanup ((make_cleanup_func) free_agent_expr, ax);
+ old_chain = make_cleanup (cleanup_agent_expr, ax);
pc = expr->elts;
trace_kludge = 0;
@@ -1854,7 +1854,7 @@
union exp_element *pc;
struct axs_value value;
- old_chain = make_cleanup ((make_cleanup_func) free_agent_expr, ax);
+ old_chain = make_cleanup (cleanup_agent_expr, ax);
pc = expr->elts;
trace_kludge = 1;
@@ -1923,9 +1923,9 @@
error_no_arg ("expression to translate");
expr = parse_expression (exp);
- old_chain = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+ old_chain = make_cleanup (free_current_contents, &expr);
agent = gen_trace_for_expr (fi->pc, expr);
- make_cleanup ((make_cleanup_func) free_agent_expr, agent);
+ make_cleanup (cleanup_agent_expr, agent);
ax_print (gdb_stdout, agent);
/* It would be nice to call ax_reqs here to gather some general info
Index: ax-general.c
===================================================================
RCS file: /cvs/src/src/gdb/ax-general.c,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 ax-general.c
--- ax-general.c 2000/02/02 00:21:04 1.1.1.5
+++ ax-general.c 2000/03/19 21:58:05
@@ -62,6 +62,12 @@
free (x);
}
+/* Like free_agent_expr but callable through make_cleanup. */
+void
+cleanup_agent_expr (void *arg)
+{
+ free_agent_expr ((struct agent_expr *) arg);
+}
/* Make sure that X has room for at least N more bytes. This doesn't
affect the length, just the allocated size. */
Index: ax.h
===================================================================
RCS file: /cvs/src/src/gdb/ax.h,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 ax.h
--- ax.h 2000/02/02 00:21:04 1.1.1.4
+++ ax.h 2000/03/19 21:58:05
@@ -144,6 +144,9 @@
/* Free a agent expression. */
extern void free_agent_expr PARAMS ((struct agent_expr *));
+/* Like free_agent_expr but callable through make_cleanup. */
+extern void cleanup_agent_expr (void *arg);
+
/* Append a simple operator OP to EXPR. */
extern void ax_simple PARAMS ((struct agent_expr * EXPR, enum agent_op OP));
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.2
diff -u -r1.2 breakpoint.c
--- breakpoint.c 2000/02/23 00:25:42 1.2
+++ breakpoint.c 2000/03/19 21:58:11
@@ -1895,7 +1895,7 @@
struct cleanup *old_chain;
struct ui_stream *stb;
stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
+ old_chain = make_cleanup_ui_out_stream_delete (stb);
#endif /* UI_OUT */
/* bs->breakpoint_at can be NULL if it was a momentary breakpoint
which has since been deleted. */
@@ -3932,7 +3932,7 @@
}
void
-disable_longjmp_breakpoint ()
+disable_longjmp_breakpoint (void *ignore)
{
register struct breakpoint *b;
@@ -4396,7 +4396,7 @@
struct ui_stream *stb;
stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
+ old_chain = make_cleanup_ui_out_stream_delete, stb);
#endif /* UI_OUT */
/* FIXME: This is misplaced; mention() is called by things (like hitting a
@@ -5679,10 +5679,9 @@
breakpoint = set_momentary_breakpoint (sal, selected_frame, bp_until);
if (!event_loop_p || !target_can_async_p ())
- old_chain = make_cleanup ((make_cleanup_func) delete_breakpoint,
- breakpoint);
+ old_chain = make_cleanup (cleanup_breakpoint, breakpoint);
else
- old_chain = make_exec_cleanup ((make_cleanup_func) delete_breakpoint, breakpoint);
+ old_chain = make_exec_cleanup (cleanup_breakpoint, breakpoint);
/* If we are running asynchronously, and the target supports async
execution, we are not waiting for the target to stop, in the call
@@ -5713,9 +5712,9 @@
sal.pc = prev_frame->pc;
breakpoint = set_momentary_breakpoint (sal, prev_frame, bp_until);
if (!event_loop_p || !target_can_async_p ())
- make_cleanup ((make_cleanup_func) delete_breakpoint, breakpoint);
+ make_cleanup (cleanup_breakpoint, breakpoint);
else
- make_exec_cleanup ((make_cleanup_func) delete_breakpoint, breakpoint);
+ make_exec_cleanup (cleanup_breakpoint, breakpoint);
}
proceed (-1, TARGET_SIGNAL_DEFAULT, 0);
@@ -6993,6 +6992,12 @@
bpt->type = bp_none;
free ((PTR) bpt);
+}
+
+void
+cleanup_breakpoint (void *arg)
+{
+ delete_breakpoint (arg);
}
void
Index: breakpoint.h
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.h,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 breakpoint.h
--- breakpoint.h 2000/02/03 04:14:27 1.1.1.11
+++ breakpoint.h 2000/03/19 21:58:11
@@ -545,6 +545,8 @@
extern void delete_breakpoint PARAMS ((struct breakpoint *));
+extern void cleanup_breakpoint (void *);
+
extern void breakpoint_auto_delete PARAMS ((bpstat));
extern void breakpoint_clear_ignore_counts PARAMS ((void));
@@ -600,7 +602,7 @@
extern void enable_longjmp_breakpoint PARAMS ((void));
-extern void disable_longjmp_breakpoint PARAMS ((void));
+extern void disable_longjmp_breakpoint (void *);
extern void set_longjmp_resume_breakpoint PARAMS ((CORE_ADDR,
struct frame_info *));
Index: coffread.c
===================================================================
RCS file: /cvs/src/src/gdb/coffread.c,v
retrieving revision 1.2
diff -u -r1.2 coffread.c
--- coffread.c 2000/02/08 04:39:01 1.2
+++ coffread.c 2000/03/19 21:58:13
@@ -203,7 +203,7 @@
static void enter_linenos PARAMS ((long, int, int, struct objfile *));
-static void free_linetab PARAMS ((void));
+static void free_linetab (void *);
static int init_lineno PARAMS ((bfd *, long, int));
@@ -211,7 +211,7 @@
static char *coff_getfilename PARAMS ((union internal_auxent *));
-static void free_stringtab PARAMS ((void));
+static void free_stringtab (void *);
static int init_stringtab PARAMS ((bfd *, long));
@@ -638,7 +638,7 @@
temp_sym = (char *) xmalloc
(cdata->local_symesz + cdata->local_auxesz);
temp_aux = temp_sym + cdata->local_symesz;
- back_to = make_cleanup ((make_cleanup_func) free_current_contents, &temp_sym);
+ back_to = make_cleanup (free_current_contents, &temp_sym);
/* We need to know whether this is a PE file, because in PE files,
unlike standard COFF files, symbol values are stored as offsets
@@ -656,7 +656,7 @@
info->max_lineno_offset = 0;
bfd_map_over_sections (abfd, find_linenos, (PTR) info);
- make_cleanup ((make_cleanup_func) free_linetab, 0);
+ make_cleanup (free_linetab, NULL);
val = init_lineno (abfd, info->min_lineno_offset,
info->max_lineno_offset - info->min_lineno_offset);
if (val < 0)
@@ -664,13 +664,13 @@
/* Now read the string table, all at once. */
- make_cleanup ((make_cleanup_func) free_stringtab, 0);
+ make_cleanup (free_stringtab, NULL);
val = init_stringtab (abfd, stringtab_offset);
if (val < 0)
error ("\"%s\": can't get string table", name);
init_minimal_symbol_collection ();
- make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ make_cleanup (discard_minimal_symbols, 0);
/* Now that the executable file is positioned at symbol table,
process it and define symbols accordingly. */
@@ -1247,7 +1247,7 @@
int val;
unsigned char lengthbuf[4];
- free_stringtab ();
+ free_stringtab (NULL);
/* If the file is stripped, the offset might be zero, indicating no
string table. Just return with `stringtab' set to null. */
@@ -1280,7 +1280,7 @@
}
static void
-free_stringtab ()
+free_stringtab (void *ignore)
{
if (stringtab)
free (stringtab);
@@ -1359,7 +1359,7 @@
linetab_offset = offset;
linetab_size = size;
- free_linetab ();
+ free_linetab (NULL);
if (size == 0)
return 0;
@@ -1381,7 +1381,7 @@
}
static void
-free_linetab ()
+free_linetab (void *ignore)
{
if (linetab)
free (linetab);
Index: command.c
===================================================================
RCS file: /cvs/src/src/gdb/command.c,v
retrieving revision 1.2
diff -u -r1.2 command.c
--- command.c 2000/02/09 08:52:45 1.2
+++ command.c 2000/03/19 21:58:14
@@ -1370,7 +1370,7 @@
int quote;
stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
+ old_chain = make_cleanup_ui_out_stream_delete (stb);
#endif /* UI_OUT */
/* Print doc minus "show" at start. */
Index: corelow.c
===================================================================
RCS file: /cvs/src/src/gdb/corelow.c,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 corelow.c
--- corelow.c 1999/12/08 02:50:37 1.1.1.6
+++ corelow.c 2000/03/19 21:58:15
@@ -32,6 +32,7 @@
#include "target.h"
#include "gdbcore.h"
#include "gdbthread.h"
+#include "symfile.h" /* cleanup_bfd_close */
/* List of all available core_fns. On gdb startup, each core file register
reader calls add_core_fns() to register information on each core format it
@@ -207,6 +208,12 @@
core_vec = NULL;
}
+static void
+cleanup_core_close (void *arg)
+{
+ core_close (0);
+}
+
#ifdef SOLIB_ADD
/* Stub function for catch_errors around shared library hacking. FROM_TTYP
is really an int * which points to from_tty. */
@@ -292,10 +299,7 @@
!gdb_check_format (temp_bfd))
{
/* Do it after the err msg */
- /* FIXME: should be checking for errors from bfd_close (for one thing,
- on error it does not free all the storage associated with the
- bfd). */
- make_cleanup ((make_cleanup_func) bfd_close, temp_bfd);
+ make_cleanup (cleanup_bfd_close, temp_bfd);
error ("\"%s\" is not a core dump: %s",
filename, bfd_errmsg (bfd_get_error ()));
}
@@ -305,7 +309,7 @@
discard_cleanups (old_chain); /* Don't free filename any more */
unpush_target (&core_ops);
core_bfd = temp_bfd;
- old_chain = make_cleanup ((make_cleanup_func) core_close, core_bfd);
+ old_chain = make_cleanup (cleanup_core_close, NULL);
/* Find a suitable core file handler to munch on core_bfd */
core_vec = sniff_core_bfd (core_bfd);
@@ -488,10 +492,7 @@
if (!bfd_check_format (temp_bfd, bfd_core))
{
/* Do it after the err msg */
- /* FIXME: should be checking for errors from bfd_close (for one thing,
- on error it does not free all the storage associated with the
- bfd). */
- make_cleanup ((make_cleanup_func) bfd_close, temp_bfd);
+ make_cleanup (cleanup_bfd_close, temp_bfd);
error ("\"%s\" is not a core dump: %s",
core, bfd_errmsg (bfd_get_error ()));
}
Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.1.1.10
diff -u -r1.1.1.10 dbxread.c
--- dbxread.c 2000/01/06 03:06:36 1.1.1.10
+++ dbxread.c 2000/03/19 21:58:17
@@ -624,7 +624,7 @@
back_to = make_cleanup (really_free_pendings, 0);
init_minimal_symbol_collection ();
- make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ make_cleanup (discard_minimal_symbols, 0);
/* Read stabs data from executable file and define symbols. */
@@ -1094,6 +1094,12 @@
bincls_allocated = 0;
}
+static void
+cleanup_bincl_list (void *arg)
+{
+ free_bincl_list (arg);
+}
+
/* Scan a SunOs dynamic symbol table for symbols of interest and
add them to the minimal symbol table. */
@@ -1295,7 +1301,7 @@
/* Init bincl list */
init_bincl_list (20, objfile);
- back_to = make_cleanup ((make_cleanup_func) free_bincl_list, objfile);
+ back_to = make_cleanup (cleanup_bincl_list, objfile);
last_source_file = NULL;
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.11
diff -u -r1.11 defs.h
--- defs.h 2000/03/13 07:30:00 1.11
+++ defs.h 2000/03/19 21:58:18
@@ -293,13 +293,6 @@
extern void discard_exec_error_cleanups (struct cleanup *);
extern void discard_my_cleanups (struct cleanup **, struct cleanup *);
-/* DEPRECATED: cagney/2000-03-04: Do not use this typedef to cast
- function pointers so that they match the argument to the various
- cleanup functions. Post GDB 5.0, this typedef will be
- deleted. [Editors note: cagney was the person that added most of
- those type casts] */
-typedef void (*make_cleanup_func) (void *);
-
/* NOTE: cagney/2000-03-04: This typedef is strictly for the
make_cleanup function declarations below. Do not use this typedef
as a cast when passing functions into the make_cleanup() code.
@@ -332,7 +325,7 @@
extern void restore_final_cleanups (struct cleanup *);
extern void restore_my_cleanups (struct cleanup **, struct cleanup *);
-extern void free_current_contents (char **);
+extern void free_current_contents (void *);
extern void null_cleanup (void *);
@@ -618,6 +611,7 @@
extern struct command_line *read_command_lines (char *, int);
extern void free_command_lines (struct command_line **);
+extern void cleanup_command_lines (void *);
/* To continue the execution commands when running gdb asynchronously.
A continuation structure contains a pointer to a function to be called
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.3
diff -u -r1.3 dwarf2read.c
--- dwarf2read.c 2000/02/29 05:10:04 1.3
+++ dwarf2read.c 2000/03/19 21:58:22
@@ -717,6 +717,7 @@
struct die_info *read_comp_unit PARAMS ((char *, bfd *));
static void free_die_list PARAMS ((struct die_info *));
+static void cleanup_die_list (void *);
static void process_die PARAMS ((struct die_info *, struct objfile *));
@@ -1342,7 +1343,7 @@
dies = read_comp_unit (info_ptr, abfd);
- make_cleanup ((make_cleanup_func) free_die_list, dies);
+ make_cleanup (cleanup_die_list, dies);
/* Do line number decoding in read_file_scope () */
process_die (dies, objfile);
@@ -2018,7 +2019,7 @@
(fip->nfnfields + DW_FIELD_ALLOC_CHUNK)
* sizeof (struct fnfieldlist));
if (fip->nfnfields == 0)
- make_cleanup ((make_cleanup_func) free_current_contents,
+ make_cleanup (free_current_contents,
&fip->fnfieldlists);
}
flp = &fip->fnfieldlists[fip->nfnfields];
@@ -2526,7 +2527,7 @@
xrealloc (range_types, (ndim + DW_FIELD_ALLOC_CHUNK)
* sizeof (struct type *));
if (ndim == 0)
- make_cleanup ((make_cleanup_func) free_current_contents,
+ make_cleanup (free_current_contents,
&range_types);
}
range_types[ndim++] = create_range_type (NULL, index_type, low, high);
@@ -2978,6 +2979,13 @@
}
}
+static void
+cleanup_die_list (arg)
+ void *arg;
+{
+ free_die_list (arg);
+}
+
/* Read the contents of the section at OFFSET and of size SIZE from the
object file specified by OBJFILE into the psymbol_obstack and return it. */
@@ -3789,7 +3797,7 @@
line_ptr += 1;
lh.standard_opcode_lengths = (unsigned char *)
xmalloc (lh.opcode_base * sizeof (unsigned char));
- back_to = make_cleanup ((make_cleanup_func) free_current_contents,
+ back_to = make_cleanup (free_current_contents,
&lh.standard_opcode_lengths);
lh.standard_opcode_lengths[0] = 1;
@@ -3809,7 +3817,7 @@
xrealloc (dirs.dirs,
(dirs.num_dirs + DIR_ALLOC_CHUNK) * sizeof (char *));
if (dirs.num_dirs == 0)
- make_cleanup ((make_cleanup_func) free_current_contents, &dirs.dirs);
+ make_cleanup (free_current_contents, &dirs.dirs);
}
dirs.dirs[dirs.num_dirs++] = cur_dir;
}
@@ -3826,7 +3834,7 @@
(files.num_files + FILE_ALLOC_CHUNK)
* sizeof (struct fileinfo));
if (files.num_files == 0)
- make_cleanup ((make_cleanup_func) free_current_contents,
+ make_cleanup (free_current_contents,
&files.files);
}
files.files[files.num_files].name = cur_file;
@@ -3902,7 +3910,7 @@
(files.num_files + FILE_ALLOC_CHUNK)
* sizeof (struct fileinfo));
if (files.num_files == 0)
- make_cleanup ((make_cleanup_func) free_current_contents,
+ make_cleanup (free_current_contents,
&files.files);
}
files.files[files.num_files].name = cur_file;
Index: elfread.c
===================================================================
RCS file: /cvs/src/src/gdb/elfread.c,v
retrieving revision 1.4
diff -u -r1.4 elfread.c
--- elfread.c 2000/02/15 04:48:23 1.4
+++ elfread.c 2000/03/19 21:58:22
@@ -593,7 +593,7 @@
CORE_ADDR offset;
init_minimal_symbol_collection ();
- back_to = make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ back_to = make_cleanup (discard_minimal_symbols, 0);
memset ((char *) &ei, 0, sizeof (ei));
Index: eval.c
===================================================================
RCS file: /cvs/src/src/gdb/eval.c,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 eval.c
--- eval.c 1999/12/14 01:05:30 1.1.1.7
+++ eval.c 2000/03/19 21:58:24
@@ -82,7 +82,7 @@
struct expression *expr = parse_expression (exp);
register CORE_ADDR addr;
register struct cleanup *old_chain =
- make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+ make_cleanup (free_current_contents, &expr);
addr = value_as_pointer (evaluate_expression (expr));
do_cleanups (old_chain);
@@ -99,7 +99,7 @@
struct expression *expr = parse_exp_1 (expptr, (struct block *) 0, 0);
register CORE_ADDR addr;
register struct cleanup *old_chain =
- make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+ make_cleanup (free_current_contents, &expr);
addr = value_as_pointer (evaluate_expression (expr));
do_cleanups (old_chain);
@@ -113,7 +113,7 @@
struct expression *expr = parse_expression (exp);
register value_ptr val;
register struct cleanup *old_chain
- = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+ = make_cleanup (free_current_contents, &expr);
val = evaluate_expression (expr);
do_cleanups (old_chain);
@@ -131,7 +131,7 @@
struct expression *expr = parse_exp_1 (expp, (struct block *) 0, 1);
register value_ptr val;
register struct cleanup *old_chain
- = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+ = make_cleanup (free_current_contents, &expr);
val = evaluate_expression (expr);
do_cleanups (old_chain);
Index: event-top.c
===================================================================
RCS file: /cvs/src/src/gdb/event-top.c,v
retrieving revision 1.3
diff -u -r1.3 event-top.c
--- event-top.c 2000/03/03 15:37:09 1.3
+++ event-top.c 2000/03/19 21:58:25
@@ -487,7 +487,7 @@
quit_flag = 0;
if (instream == stdin && stdin_is_tty)
reinitialize_more_filter ();
- old_chain = make_cleanup ((make_cleanup_func) command_loop_marker, 0);
+ old_chain = make_cleanup (command_loop_marker, 0);
#if defined(TUI)
insert_mode = 0;
Index: hp-psymtab-read.c
===================================================================
RCS file: /cvs/src/src/gdb/hp-psymtab-read.c,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 hp-psymtab-read.c
--- hp-psymtab-read.c 1999/12/22 21:45:06 1.1.1.6
+++ hp-psymtab-read.c 2000/03/19 21:58:27
@@ -1628,7 +1628,7 @@
(struct partial_symtab **) alloca (dependencies_allocated *
sizeof (struct partial_symtab *));
- old_chain = make_cleanup ((make_cleanup_func) free_objfile, objfile);
+ old_chain = make_cleanup (cleanup_objfile, objfile);
last_source_file = 0;
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.2
diff -u -r1.2 hppa-tdep.c
--- hppa-tdep.c 2000/02/09 08:52:45 1.2
+++ hppa-tdep.c 2000/03/19 21:58:31
@@ -1618,7 +1618,7 @@
breakpoint->silent = 1;
/* So we can clean things up. */
- old_chain = make_cleanup ((make_cleanup_func) delete_breakpoint, breakpoint);
+ old_chain = make_cleanup (cleanup_breakpoint, breakpoint);
/* Start up the inferior. */
clear_proceed_status ();
Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.2
diff -u -r1.2 infcmd.c
--- infcmd.c 2000/02/23 15:53:33 1.2
+++ infcmd.c 2000/03/19 21:58:32
@@ -489,10 +489,9 @@
{
enable_longjmp_breakpoint ();
if (!event_loop_p || !target_can_async_p ())
- cleanups = make_cleanup ((make_cleanup_func) disable_longjmp_breakpoint,
- 0);
+ cleanups = make_cleanup (disable_longjmp_breakpoint, NULL);
else
- make_exec_cleanup ((make_cleanup_func) disable_longjmp_breakpoint, 0);
+ make_exec_cleanup (disable_longjmp_breakpoint, NULL);
}
/* In synchronous case, all is well, just use the regular for loop. */
@@ -1194,9 +1193,9 @@
breakpoint = set_momentary_breakpoint (sal, frame, bp_finish);
if (!event_loop_p || !target_can_async_p ())
- old_chain = make_cleanup ((make_cleanup_func) delete_breakpoint, breakpoint);
+ old_chain = make_cleanup (cleanup_breakpoint, breakpoint);
else
- old_chain = make_exec_cleanup ((make_cleanup_func) delete_breakpoint, breakpoint);
+ old_chain = make_exec_cleanup (cleanup_breakpoint, breakpoint);
/* Find the function we will return from. */
Index: inferior.h
===================================================================
RCS file: /cvs/src/src/gdb/inferior.h,v
retrieving revision 1.2
diff -u -r1.2 inferior.h
--- inferior.h 2000/02/29 13:53:59 1.2
+++ inferior.h 2000/03/19 21:58:32
@@ -40,7 +40,7 @@
extern struct inferior_status *save_inferior_status PARAMS ((int));
-extern void restore_inferior_status PARAMS ((struct inferior_status *));
+extern void restore_inferior_status (void *);
extern void discard_inferior_status PARAMS ((struct inferior_status *));
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.4
diff -u -r1.4 infrun.c
--- infrun.c 2000/02/29 07:17:15 1.4
+++ infrun.c 2000/03/19 21:58:36
@@ -46,7 +46,7 @@
static void sig_print_header (void);
-static void resume_cleanups (int);
+static void resume_cleanups (void *);
static int hook_stop_stub (void *);
@@ -745,7 +745,7 @@
/* Things to clean up if we QUIT out of resume (). */
/* ARGSUSED */
static void
-resume_cleanups (int arg)
+resume_cleanups (void *arg)
{
normal_stop ();
}
@@ -784,8 +784,7 @@
resume (int step, enum target_signal sig)
{
int should_resume = 1;
- struct cleanup *old_cleanups = make_cleanup ((make_cleanup_func)
- resume_cleanups, 0);
+ struct cleanup *old_cleanups = make_cleanup (resume_cleanups, NULL);
QUIT;
#ifdef CANNOT_STEP_BREAKPOINT
@@ -2271,7 +2270,7 @@
/* If we hit the breakpoint at longjmp, disable it for the
duration of this command. Then, install a temporary
breakpoint at the target of the jmp_buf. */
- disable_longjmp_breakpoint ();
+ disable_longjmp_breakpoint (NULL);
remove_breakpoints ();
breakpoints_inserted = 0;
if (!GET_LONGJMP_TARGET (&jmp_buf_pc))
@@ -2322,7 +2321,7 @@
return;
}
#endif /* 0 */
- disable_longjmp_breakpoint ();
+ disable_longjmp_breakpoint (NULL);
ecs->handling_longjmp = 0; /* FIXME */
if (what.main_action == BPSTAT_WHAT_CLEAR_LONGJMP_RESUME)
break;
@@ -4014,8 +4013,10 @@
}
void
-restore_inferior_status (struct inferior_status *inf_status)
+restore_inferior_status (void *arg)
{
+ struct inferior_status *inf_status = (struct inferior_status *) arg;
+
stop_signal = inf_status->stop_signal;
stop_pc = inf_status->stop_pc;
stop_step = inf_status->stop_step;
Index: minsyms.c
===================================================================
RCS file: /cvs/src/src/gdb/minsyms.c,v
retrieving revision 1.3
diff -u -r1.3 minsyms.c
--- minsyms.c 2000/03/09 22:58:49 1.3
+++ minsyms.c 2000/03/19 21:58:37
@@ -728,8 +728,7 @@
/* ARGSUSED */
void
-discard_minimal_symbols (foo)
- int foo;
+discard_minimal_symbols (void *arg)
{
register struct msym_bunch *next;
Index: mipsread.c
===================================================================
RCS file: /cvs/src/src/gdb/mipsread.c,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 mipsread.c
--- mipsread.c 1999/09/08 23:59:22 1.1.1.5
+++ mipsread.c 2000/03/19 21:58:37
@@ -94,7 +94,7 @@
struct cleanup *back_to;
init_minimal_symbol_collection ();
- back_to = make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ back_to = make_cleanup (discard_minimal_symbols, 0);
/* Now that the executable file is positioned at symbol table,
process it and define symbols accordingly. */
Index: nlmread.c
===================================================================
RCS file: /cvs/src/src/gdb/nlmread.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 nlmread.c
--- nlmread.c 1999/08/09 21:33:43 1.1.1.4
+++ nlmread.c 2000/03/19 21:58:37
@@ -192,7 +192,7 @@
struct symbol *mainsym;
init_minimal_symbol_collection ();
- back_to = make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ back_to = make_cleanup (discard_minimal_symbols, 0);
/* FIXME, should take a section_offsets param, not just an offset. */
Index: objfiles.c
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.c,v
retrieving revision 1.2
diff -u -r1.2 objfiles.c
--- objfiles.c 2000/02/29 12:58:51 1.2
+++ objfiles.c 2000/03/19 21:58:38
@@ -495,6 +495,12 @@
}
}
+void
+cleanup_objfile (void *arg)
+{
+ free_objfile (arg);
+}
+
/* Free all the object files at once and clean up their users. */
Index: objfiles.h
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.h,v
retrieving revision 1.2
diff -u -r1.2 objfiles.h
--- objfiles.h 2000/03/07 04:33:52 1.2
+++ objfiles.h 2000/03/19 21:58:39
@@ -496,6 +496,9 @@
free_objfile PARAMS ((struct objfile *));
extern void
+cleanup_objfile (void *);
+
+extern void
free_all_objfiles PARAMS ((void));
extern void
Index: os9kread.c
===================================================================
RCS file: /cvs/src/src/gdb/os9kread.c,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 os9kread.c
--- os9kread.c 1999/09/08 23:59:23 1.1.1.6
+++ os9kread.c 2000/03/19 21:58:40
@@ -342,7 +342,7 @@
free_pending_blocks ();
back_to = make_cleanup (really_free_pendings, 0);
- make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ make_cleanup (discard_minimal_symbols, 0);
read_minimal_symbols (objfile);
/* Now that the symbol table data of the executable file are all in core,
Index: parse.c
===================================================================
RCS file: /cvs/src/src/gdb/parse.c,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 parse.c
--- parse.c 1999/10/12 04:37:23 1.1.1.11
+++ parse.c 2000/03/19 21:58:41
@@ -78,7 +78,7 @@
extern int hp_som_som_object_present;
static void
-free_funcalls PARAMS ((void));
+free_funcalls (void *);
static void
prefixify_expression PARAMS ((struct expression *));
@@ -177,7 +177,7 @@
Used when there is an error inside parsing. */
static void
-free_funcalls ()
+free_funcalls (void *ignore)
{
register struct funcall *call, *next;
@@ -1165,7 +1165,7 @@
if (lexptr == 0 || *lexptr == 0)
error_no_arg ("expression to compute");
- old_chain = make_cleanup ((make_cleanup_func) free_funcalls, 0);
+ old_chain = make_cleanup (free_funcalls, NULL);
funcall_chain = 0;
expression_context_block = block ? block : get_selected_block ();
@@ -1176,7 +1176,7 @@
expout = (struct expression *)
xmalloc (sizeof (struct expression) + EXP_ELEM_TO_BYTES (expout_size));
expout->language_defn = current_language;
- make_cleanup ((make_cleanup_func) free_current_contents, &expout);
+ make_cleanup (free_current_contents, &expout);
if (current_language->la_parser ())
current_language->la_error (NULL);
Index: printcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/printcmd.c,v
retrieving revision 1.1.1.8
diff -u -r1.1.1.8 printcmd.c
--- printcmd.c 2000/02/05 07:29:47 1.1.1.8
+++ printcmd.c 2000/03/19 21:58:43
@@ -922,7 +922,7 @@
{
struct type *type;
expr = parse_expression (exp);
- old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
+ old_chain = make_cleanup (free_current_contents,
&expr);
cleanup = 1;
val = evaluate_expression (expr);
@@ -1036,7 +1036,7 @@
}
expr = parse_expression (exp);
- old_chain = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+ old_chain = make_cleanup (free_current_contents, &expr);
val = evaluate_expression (expr);
@@ -1060,7 +1060,7 @@
{
struct expression *expr = parse_expression (exp);
register struct cleanup *old_chain
- = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+ = make_cleanup (free_current_contents, &expr);
evaluate_expression (expr);
do_cleanups (old_chain);
}
@@ -1357,7 +1357,7 @@
But don't clobber a user-defined command's definition. */
if (from_tty)
*exp = 0;
- old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
+ old_chain = make_cleanup (free_current_contents,
&expr);
val = evaluate_expression (expr);
if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_REF)
@@ -1840,7 +1840,7 @@
struct ui_stream *stb;
stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
+ old_chain = make_cleanup_ui_out_stream_delete (stb);
#endif /* UI_OUT */
if (func)
@@ -2096,8 +2096,7 @@
struct cleanup *old_cleanups;
val_args = (value_ptr *) xmalloc (allocated_args * sizeof (value_ptr));
- old_cleanups = make_cleanup ((make_cleanup_func) free_current_contents,
- &val_args);
+ old_cleanups = make_cleanup (free_current_contents, &val_args);
if (s == 0)
error_no_arg ("format-control string and values to print");
Index: procfs.c
===================================================================
RCS file: /cvs/src/src/gdb/procfs.c,v
retrieving revision 1.3
diff -u -r1.3 procfs.c
--- procfs.c 2000/02/29 13:53:59 1.3
+++ procfs.c 2000/03/19 21:58:46
@@ -707,6 +707,12 @@
}
}
+static void
+cleanup_procinfo (void *arg)
+{
+ destroy_procinfo (arg);
+}
+
enum { NOKILL, KILL };
/*
@@ -2615,6 +2621,20 @@
#endif
}
+static void
+cleanup_close (void *arg)
+{
+ if (close ((int) arg) < 0)
+ perror ("cleanup_close");
+}
+
+static void
+cleanup_closedir (void *arg)
+{
+ if (closedir ((DIR *) arg) < 0)
+ perror ("cleanup_closedir");
+}
+
/*
* Function: proc_iterate_over_mappings
*
@@ -2657,7 +2677,7 @@
proc_error (pi, "proc_iterate_over_mappings (open)", __LINE__);
/* Make sure it gets closed again. */
- make_cleanup ((make_cleanup_func) close, (void *) map_fd);
+ make_cleanup (cleanup_close, (void *) map_fd);
/* Allocate space for mapping (lifetime only for this function). */
map = alloca (sizeof (struct prmap));
@@ -2768,7 +2788,7 @@
return NULL;
}
/* Make sure it gets closed again! */
- old_chain = make_cleanup ((make_cleanup_func) close, (void *) fd);
+ old_chain = make_cleanup (cleanup_close, (void *) fd);
/* Now 'read' thru the table, find a match and return it. */
while (read (fd, ldt_entry, sizeof (struct ssd)) == sizeof (struct ssd))
@@ -3075,7 +3095,7 @@
if ((dirp = opendir (pathname)) == NULL)
proc_error (pi, "update_threads, opendir", __LINE__);
- old_chain = make_cleanup ((make_cleanup_func) closedir, dirp);
+ old_chain = make_cleanup (cleanup_closedir, dirp);
while ((direntry = readdir (dirp)) != NULL)
if (direntry->d_name[0] != '.') /* skip '.' and '..' */
{
@@ -5047,7 +5067,7 @@
if ((argv = buildargv (args)) == NULL)
nomem (0);
else
- make_cleanup ((make_cleanup_func) freeargv, argv);
+ make_cleanup_freeargv (argv);
}
while (argv != NULL && *argv != NULL)
{
@@ -5081,7 +5101,7 @@
/* No. So open a procinfo for it, but
remember to close it again when finished. */
process = create_procinfo (pid, 0);
- make_cleanup ((make_cleanup_func) destroy_procinfo, process);
+ make_cleanup (cleanup_procinfo, process);
if (!open_procinfo_files (process, FD_CTL))
proc_error (process, "info proc, open_procinfo_files", __LINE__);
}
Index: remote-e7000.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-e7000.c,v
retrieving revision 1.2
diff -u -r1.2 remote-e7000.c
--- remote-e7000.c 2000/02/09 08:52:46 1.2
+++ remote-e7000.c 2000/03/19 21:58:48
@@ -1580,7 +1580,7 @@
perror_with_name (filename);
return;
}
- old_chain = make_cleanup ((make_cleanup_func) bfd_close, pbfd);
+ old_chain = make_cleanup (cleanup_bfd_close, pbfd);
if (!bfd_check_format (pbfd, bfd_object))
error ("\"%s\" is not an object file: %s", filename,
Index: remote-udi.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-udi.c,v
retrieving revision 1.2
diff -u -r1.2 remote-udi.c
--- remote-udi.c 2000/02/09 08:52:47 1.2
+++ remote-udi.c 2000/03/19 21:58:49
@@ -1108,7 +1108,7 @@
error ("Must specify at least a file name with the load command");
filename = tilde_expand (filename);
- make_cleanup ((make_cleanup_func) free, filename);
+ make_cleanup (free, filename);
while (token = strtok (NULL, " \t"))
{
@@ -1162,7 +1162,7 @@
/* FIXME: should be checking for errors from bfd_close (for one thing,
on error it does not free all the storage associated with the
bfd). */
- make_cleanup ((make_cleanup_func) bfd_close, pbfd);
+ make_cleanup (cleanup_bfd_close, pbfd);
QUIT;
immediate_quit++;
Index: solib.c
===================================================================
RCS file: /cvs/src/src/gdb/solib.c,v
retrieving revision 1.2
diff -u -r1.2 solib.c
--- solib.c 2000/03/06 18:04:56 1.2
+++ solib.c 2000/03/19 21:58:50
@@ -417,7 +417,7 @@
}
init_minimal_symbol_collection ();
- make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ make_cleanup (discard_minimal_symbols, 0);
while (rtc_symp)
{
@@ -943,7 +943,7 @@
return 0;
}
- make_cleanup ((make_cleanup_func) free, (void *) filename);
+ make_cleanup (free, filename);
/* Have a pathname: read the symbol file. */
symbol_file_command (filename, from_tty);
Index: somread.c
===================================================================
RCS file: /cvs/src/src/gdb/somread.c,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 somread.c
--- somread.c 1999/10/05 23:08:49 1.1.1.7
+++ somread.c 2000/03/19 21:58:51
@@ -366,7 +366,7 @@
do_pxdb (symfile_bfd_open (objfile->name));
init_minimal_symbol_collection ();
- back_to = make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ back_to = make_cleanup (discard_minimal_symbols, 0);
/* Read in the import list and the export list. Currently
the export list isn't used; the import list is used in
Index: sparcl-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparcl-tdep.c,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 sparcl-tdep.c
--- sparcl-tdep.c 1999/08/31 01:06:04 1.1.1.6
+++ sparcl-tdep.c 2000/03/19 21:58:51
@@ -44,7 +44,7 @@
static serial_t open_tty PARAMS ((char *name));
static int send_resp PARAMS ((serial_t desc, char c));
-static void close_tty PARAMS ((int ignore));
+static void close_tty (void *);
#ifdef HAVE_SOCKETS
static int recv_udp_buf PARAMS ((int fd, unsigned char *buf, int len, int timeout));
static int send_udp_buf PARAMS ((int fd, unsigned char *buf, int len));
@@ -358,8 +358,7 @@
}
static void
-close_tty (ignore)
- int ignore;
+close_tty (void *arg)
{
if (!remote_desc)
return;
@@ -480,7 +479,7 @@
{
remote_desc = open_tty (p);
- old_chain = make_cleanup ((make_cleanup_func) close_tty, 0);
+ old_chain = make_cleanup (close_tty, 0);
c = send_resp (remote_desc, 0x00);
@@ -614,7 +613,7 @@
perror_with_name (filename);
return;
}
- old_chain = make_cleanup ((make_cleanup_func) bfd_close, pbfd);
+ old_chain = make_cleanup (cleanup_bfd_close, pbfd);
if (!bfd_check_format (pbfd, bfd_object))
error ("\"%s\" is not an object file: %s", filename,
Index: stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.3
diff -u -r1.3 stack.c
--- stack.c 2000/02/29 07:17:15 1.3
+++ stack.c 2000/03/19 21:58:53
@@ -471,7 +471,7 @@
struct cleanup *old_chain;
stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
+ old_chain = make_cleanup_ui_out_stream_delete, stb);
#endif /* UI_OUT */
func = find_pc_function (fi->pc);
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.1.1.17
diff -u -r1.1.1.17 symfile.c
--- symfile.c 2000/02/03 04:14:35 1.1.1.17
+++ symfile.c 2000/03/19 21:58:56
@@ -554,13 +554,13 @@
/* Make sure that partially constructed symbol tables will be cleaned up
if an error occurs during symbol reading. */
- old_chain = make_cleanup ((make_cleanup_func) free_objfile, objfile);
+ old_chain = make_cleanup (cleanup_objfile, objfile);
if (mainline)
{
/* We will modify the main symbol table, make sure that all its users
will be cleaned up if an error occurs during symbol reading. */
- make_cleanup ((make_cleanup_func) clear_symtab_users, 0);
+ make_cleanup (cleanup_symtab_users, NULL);
/* Since no error yet, throw away the old symbol table. */
@@ -1145,6 +1145,19 @@
return (sym_bfd);
}
+/* Verison of bfd_close suitable for passing to make_cleanup. */
+void
+cleanup_bfd_close (void *arg)
+{
+ bfd *abfd = (bfd *)arg;
+ char *name = bfd_get_filename (abfd);
+
+ if (!bfd_close (abfd))
+ /* Question: does bfd_close free all the resources associated with
+ the bfd? Should we do it here? */
+ warning ("cannot close \"%s\": %s", name, bfd_errmsg (bfd_get_error ()));
+}
+
/* Link a new symtab_fns into the global symtab_fns list. Called on gdb
startup by the _initialize routine in each object file format reader,
to register information about each format the the reader is prepared
@@ -1257,10 +1270,7 @@
return;
}
- /* FIXME: should be checking for errors from bfd_close (for one thing,
- on error it does not free all the storage associated with the
- bfd). */
- make_cleanup ((make_cleanup_func) bfd_close, loadfile_bfd);
+ make_cleanup (cleanup_bfd_close, loadfile_bfd);
if (!bfd_check_format (loadfile_bfd, bfd_object))
{
@@ -1723,10 +1733,9 @@
/* If we get an error, blow away this objfile (not sure if
that is the correct response for things like shared
libraries). */
- old_cleanups = make_cleanup ((make_cleanup_func) free_objfile,
- objfile);
+ old_cleanups = make_cleanup (cleanup_objfile, objfile);
/* We need to do this whenever any symbols go away. */
- make_cleanup ((make_cleanup_func) clear_symtab_users, 0);
+ make_cleanup (cleanup_symtab_users, NULL);
/* Clean up any state BFD has sitting around. We don't need
to close the descriptor but BFD lacks a way of closing the
@@ -2150,6 +2159,12 @@
target_new_objfile_hook (NULL);
}
+void
+cleanup_symtab_users (void *arg)
+{
+ clear_symtab_users ();
+}
+
/* clear_symtab_users_once:
This function is run after symbol reading, or from a cleanup.
@@ -2331,6 +2346,7 @@
clear_symtab_users_queued++;
make_cleanup (clear_symtab_users_once, 0);
+#error bitrot - clear_symtab_users_once mismatches make_cleanup
blewit = 1;
}
else
Index: symfile.h
===================================================================
RCS file: /cvs/src/src/gdb/symfile.h,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 symfile.h
--- symfile.h 1999/10/19 02:46:39 1.1.1.6
+++ symfile.h 2000/03/19 21:58:56
@@ -221,6 +221,8 @@
extern bfd *symfile_bfd_open PARAMS ((char *));
+extern void cleanup_bfd_close (void *);
+
/* Utility functions for overlay sections: */
extern int overlay_debugging;
extern int overlay_cache_invalid;
Index: symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.2
diff -u -r1.2 symtab.c
--- symtab.c 2000/02/08 04:39:02 1.2
+++ symtab.c 2000/03/19 21:58:59
@@ -3556,9 +3556,10 @@
/* Free any memory associated with a search. */
void
-free_search_symbols (symbols)
- struct symbol_search *symbols;
+free_search_symbols (void *arg)
{
+ struct symbol_search *symbols = (struct symbol_search *) arg;
+
struct symbol_search *p;
struct symbol_search *next;
@@ -3801,8 +3802,7 @@
if (tail == NULL)
{
sr = psr;
- old_chain = make_cleanup ((make_cleanup_func)
- free_search_symbols, sr);
+ old_chain = make_cleanup (free_search_symbols, sr);
}
else
tail->next = psr;
@@ -3846,8 +3846,8 @@
if (tail == NULL)
{
sr = psr;
- old_chain = make_cleanup ((make_cleanup_func)
- free_search_symbols, &sr);
+ old_chain = make_cleanup (free_search_symbols,
+ &sr);
}
else
tail->next = psr;
@@ -3962,7 +3962,7 @@
/* must make sure that if we're interrupted, symbols gets freed */
search_symbols (regexp, kind, 0, (char **) NULL, &symbols);
- old_chain = make_cleanup ((make_cleanup_func) free_search_symbols, symbols);
+ old_chain = make_cleanup (free_search_symbols, symbols);
printf_filtered (regexp
? "All %ss matching regular expression \"%s\":\n"
@@ -4050,7 +4050,7 @@
struct cleanup *old_chain;
search_symbols (regexp, FUNCTIONS_NAMESPACE, 0, (char **) NULL, &ss);
- old_chain = make_cleanup ((make_cleanup_func) free_search_symbols, ss);
+ old_chain = make_cleanup (free_search_symbols, ss);
for (p = ss; p != NULL; p = p->next)
{
Index: symtab.h
===================================================================
RCS file: /cvs/src/src/gdb/symtab.h,v
retrieving revision 1.2
diff -u -r1.2 symtab.h
--- symtab.h 2000/03/07 04:33:52 1.2
+++ symtab.h 2000/03/19 21:59:00
@@ -1291,7 +1291,7 @@
init_minimal_symbol_collection PARAMS ((void));
extern void
-discard_minimal_symbols PARAMS ((int));
+discard_minimal_symbols (void *);
extern void
install_minimal_symbols PARAMS ((struct objfile *));
@@ -1480,6 +1480,8 @@
extern void
clear_symtab_users PARAMS ((void));
+extern void cleanup_symtab_users (void *);
+
extern enum language
deduce_language_from_filename PARAMS ((char *));
@@ -1517,6 +1519,6 @@
};
extern void search_symbols PARAMS ((char *, namespace_enum, int, char **, struct symbol_search **));
-extern void free_search_symbols PARAMS ((struct symbol_search *));
+extern void free_search_symbols (void *);
#endif /* !defined(SYMTAB_H) */
Index: thread.c
===================================================================
RCS file: /cvs/src/src/gdb/thread.c,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 thread.c
--- thread.c 2000/02/03 04:14:36 1.1.1.11
+++ thread.c 2000/03/19 21:59:01
@@ -59,7 +59,7 @@
static int thread_alive PARAMS ((struct thread_info *));
static void info_threads_command PARAMS ((char *, int));
static void thread_apply_command PARAMS ((char *, int));
-static void restore_current_thread PARAMS ((int));
+static void restore_current_thread (void *);
static void switch_to_thread PARAMS ((int pid));
static void prune_threads PARAMS ((void));
@@ -508,10 +508,16 @@
select_frame (get_current_frame (), 0);
}
+struct thread_number {
+ int pid;
+};
+
static void
-restore_current_thread (pid)
- int pid;
+restore_current_thread (void *arg)
{
+ int pid = ((struct thread_number *)arg)->pid;
+ free (arg);
+
if (pid != inferior_pid)
{
switch_to_thread (pid);
@@ -519,6 +525,14 @@
}
}
+static struct cleanup *
+make_cleanup_restore_current_thread (int pid)
+{
+ struct thread_number *tn = xmalloc (sizeof (struct thread_number));
+ tn->pid = pid;
+ return make_cleanup (restore_current_thread, tn);
+}
+
/* Apply a GDB command to a list of threads. List syntax is a whitespace
seperated list of numbers, or ranges, or the keyword `all'. Ranges consist
of two numbers seperated by a hyphen. Examples:
@@ -539,8 +553,7 @@
if (cmd == NULL || *cmd == '\000')
error ("Please specify a command following the thread ID list");
- old_chain = make_cleanup ((make_cleanup_func) restore_current_thread,
- (void *) inferior_pid);
+ old_chain = make_cleanup_restore_current_thread (inferior_pid);
for (tp = thread_list; tp; tp = tp->next)
if (thread_alive (tp))
@@ -575,8 +588,7 @@
if (*cmd == '\000')
error ("Please specify a command following the thread ID list");
- old_chain = make_cleanup ((make_cleanup_func) restore_current_thread,
- (void *) inferior_pid);
+ old_chain = make_cleanup_restore_current_thread (inferior_pid);
while (tidlist < cmd)
{
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.4
diff -u -r1.4 top.c
--- top.c 2000/02/24 00:04:03 1.4
+++ top.c 2000/03/19 21:59:04
@@ -76,7 +76,7 @@
/* NOTE 1999-04-29: this function will be static again, after we make the
event loop be the default command loop for gdb, and we merge
event-top.c into this file, top.c */
-/* static */ void command_loop_marker PARAMS ((int));
+/* static */ void command_loop_marker (void *);
static void while_command PARAMS ((char *, int));
@@ -101,7 +101,7 @@
static char *insert_args PARAMS ((char *));
-static void arg_cleanup PARAMS ((void));
+static void arg_cleanup (void *);
static void init_main PARAMS ((void));
@@ -153,7 +153,7 @@
static void disconnect PARAMS ((int));
#endif
-static void source_cleanup PARAMS ((FILE *));
+static void source_cleanup (void *);
/* Default command line prompt. This is overriden in some configs. */
@@ -753,9 +753,10 @@
user-defined command). */
static void
-source_cleanup (stream)
- FILE *stream;
+source_cleanup (void *arg)
{
+ FILE *stream = (void *)arg;
+
/* Restore the previous input stream. */
instream = stream;
}
@@ -767,7 +768,7 @@
{
struct cleanup *cleanups;
- cleanups = make_cleanup ((make_cleanup_func) source_cleanup, instream);
+ cleanups = make_cleanup (source_cleanup, instream);
instream = stream;
command_loop ();
do_cleanups (cleanups);
@@ -777,6 +778,13 @@
void (*pre_init_ui_hook) PARAMS ((void));
+static void
+cleanup_chdir (void *arg)
+{
+ if (chdir (arg) < 0)
+ perror_with_name (arg);
+}
+
void
gdb_init (argv0)
char *argv0;
@@ -792,7 +800,7 @@
#ifdef __MSDOS__
/* Make sure we return to the original directory upon exit, come
what may, since the OS doesn't do that for us. */
- make_final_cleanup ((make_cleanup_func) chdir, strsave (current_directory));
+ make_final_cleanup (cleanup_chdir, strsave (current_directory));
#endif
init_cmd_lists (); /* This needs to be done first */
@@ -877,7 +885,7 @@
/* Allocate and build a new command line structure. */
cmd = build_command_line (type, arg);
- old_chain = make_cleanup ((make_cleanup_func) free_command_lines, &cmd);
+ old_chain = make_cleanup (cleanup_command_lines, &cmd);
/* Read in the body of this command. */
if (recurse_read_control_structure (cmd) == invalid_control)
@@ -1087,7 +1095,7 @@
new_line = insert_args (cmd->line);
if (!new_line)
return invalid_control;
- old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
+ old_chain = make_cleanup (free_current_contents,
&new_line);
execute_command (new_line, 0);
ret = cmd->control_type;
@@ -1106,10 +1114,10 @@
new_line = insert_args (cmd->line);
if (!new_line)
return invalid_control;
- old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
+ old_chain = make_cleanup (free_current_contents,
&new_line);
expr = parse_expression (new_line);
- make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+ make_cleanup (free_current_contents, &expr);
ret = simple_control;
loop = 1;
@@ -1167,11 +1175,11 @@
new_line = insert_args (cmd->line);
if (!new_line)
return invalid_control;
- old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
+ old_chain = make_cleanup (free_current_contents,
&new_line);
/* Parse the conditional for the if statement. */
expr = parse_expression (new_line);
- make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+ make_cleanup (free_current_contents, &expr);
current = NULL;
ret = simple_control;
@@ -1257,7 +1265,7 @@
/* Cleanup */
static void
-arg_cleanup ()
+arg_cleanup (void *arg)
{
struct user_args *oargs = user_args;
if (!user_args)
@@ -1284,7 +1292,7 @@
args->next = user_args;
user_args = args;
- old_chain = make_cleanup ((make_cleanup_func) arg_cleanup, 0);
+ old_chain = make_cleanup (arg_cleanup, NULL);
if (p == NULL)
return old_chain;
@@ -1448,7 +1456,7 @@
/* Set the instream to 0, indicating execution of a
user-defined function. */
- old_chain = make_cleanup ((make_cleanup_func) source_cleanup, instream);
+ old_chain = make_cleanup (source_cleanup, instream);
instream = (FILE *) 0;
while (cmdlines)
{
@@ -1568,8 +1576,7 @@
gdb to use the event loop as the default command loop and we merge
event-top.c into this file, top.c */
/* static */ void
-command_loop_marker (foo)
- int foo;
+command_loop_marker (void *arg)
{
}
@@ -1600,7 +1607,7 @@
quit_flag = 0;
if (instream == stdin && stdin_is_tty)
reinitialize_more_filter ();
- old_chain = make_cleanup ((make_cleanup_func) command_loop_marker, 0);
+ old_chain = make_cleanup (command_loop_marker, 0);
#if defined(TUI)
/* A bit of paranoia: I want to make sure the "insert_mode" global
@@ -1681,7 +1688,7 @@
quit_flag = 0;
if (instream == stdin && stdin_is_tty)
reinitialize_more_filter ();
- old_chain = make_cleanup ((make_cleanup_func) command_loop_marker, 0);
+ old_chain = make_cleanup (command_loop_marker, 0);
/* Get a command-line. */
command = (*read_input_func) (instream == stdin ?
@@ -2839,7 +2846,7 @@
else
{
head = next;
- old_chain = make_cleanup ((make_cleanup_func) free_command_lines,
+ old_chain = make_cleanup (cleanup_command_lines,
&head);
}
tail = next;
@@ -2889,6 +2896,12 @@
l = next;
}
}
+
+void
+cleanup_command_lines (void *arg)
+{
+ free_command_lines (arg);
+}
\f
/* Add an element to the list of info subcommands. */
@@ -3722,6 +3735,14 @@
error_pre_print = p->old_error_pre_print;
}
+static void
+cleanup_fclose (void *arg)
+{
+ FILE *fp = (FILE *) arg;
+ if (fclose (fp) < 0)
+ perror_with_name ("cleanup_fclose");
+}
+
/* ARGSUSED */
void
source_command (args, from_tty)
@@ -3751,7 +3772,7 @@
return;
}
- make_cleanup ((make_cleanup_func) fclose, stream);
+ make_cleanup (cleanup_fclose, stream);
old_lines.old_line = source_line_number;
old_lines.old_file = source_file_name;
Index: top.h
===================================================================
RCS file: /cvs/src/src/gdb/top.h,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 top.h
--- top.h 2000/02/03 04:14:30 1.1.1.11
+++ top.h 2000/03/19 21:59:04
@@ -39,7 +39,7 @@
extern int quit_confirm PARAMS ((void));
extern void quit_force PARAMS ((char *, int));
extern void quit_command PARAMS ((char *, int));
-extern void command_loop_marker PARAMS ((int));
+extern void command_loop_marker (void *);
extern int quit_cover PARAMS ((PTR));
extern void execute_command PARAMS ((char *, int));
Index: tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 tracepoint.c
--- tracepoint.c 1999/12/14 01:05:38 1.1.1.11
+++ tracepoint.c 2000/03/19 21:59:06
@@ -854,7 +854,7 @@
signal (STOP_SIGNAL, stop_sig);
}
#endif
- old_chain = make_cleanup ((make_cleanup_func) free_actions, (void *) t);
+ old_chain = make_cleanup (cleanup_actions, t);
while (1)
{
/* Make sure that all output has been output. Some machines may let
@@ -977,7 +977,7 @@
/* else fall thru, treat p as an expression and parse it! */
}
exp = parse_exp_1 (&p, block_for_pc (t->address), 1);
- old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
+ old_chain = make_cleanup (free_current_contents,
&exp);
if (exp->elts[0].opcode == OP_VAR_VALUE)
@@ -1000,7 +1000,7 @@
/* we have something to collect, make sure that the expr to
bytecode translator can handle it and that it's not too long */
aexpr = gen_trace_for_expr (t->address, exp);
- (void) make_cleanup ((make_cleanup_func) free_agent_expr, aexpr);
+ (void) make_cleanup (cleanup_agent_expr, aexpr);
if (aexpr->len > MAX_AGENT_EXPR_LEN)
error ("expression too complicated, try simplifying");
@@ -1064,6 +1064,12 @@
t->actions = NULL;
}
+void
+cleanup_actions (void *arg)
+{
+ free_actions (arg);
+}
+
struct memrange
{
int type; /* 0 for absolute memory range, else basereg number */
@@ -1588,8 +1594,7 @@
struct agent_reqs areqs;
exp = parse_exp_1 (&action_exp, block_for_pc (t->address), 1);
- old_chain = make_cleanup ((make_cleanup_func)
- free_current_contents, &exp);
+ old_chain = make_cleanup (free_current_contents, &exp);
switch (exp->elts[0].opcode)
{
@@ -1618,8 +1623,7 @@
default: /* full-fledged expression */
aexpr = gen_trace_for_expr (t->address, exp);
- old_chain1 = make_cleanup ((make_cleanup_func)
- free_agent_expr, aexpr);
+ old_chain1 = make_cleanup (cleanup_agent_expr, aexpr);
ax_reqs (aexpr, &areqs);
if (areqs.flaw != agent_flaw_none)
Index: tracepoint.h
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.h,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 tracepoint.h
--- tracepoint.h 1999/12/07 03:56:07 1.1.1.4
+++ tracepoint.h 2000/03/19 21:59:06
@@ -124,6 +124,7 @@
struct tracepoint *get_tracepoint_by_number PARAMS ((char **, int, int));
int get_traceframe_number PARAMS ((void));
void free_actions PARAMS ((struct tracepoint *));
+void cleanup_actions (void *);
enum actionline_type validate_actionline PARAMS ((char **,
struct tracepoint *));
Index: typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/typeprint.c,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 typeprint.c
--- typeprint.c 2000/02/02 00:21:11 1.1.1.5
+++ typeprint.c 2000/03/19 21:59:06
@@ -89,7 +89,7 @@
if (exp)
{
expr = parse_expression (exp);
- old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
+ old_chain = make_cleanup (free_current_contents,
&expr);
val = evaluate_type (expr);
}
@@ -161,7 +161,7 @@
else
{
expr = parse_expression (typename);
- old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
+ old_chain = make_cleanup (free_current_contents,
&expr);
type = ptype_eval (expr);
if (type != NULL)
@@ -282,7 +282,7 @@
if (typename != NULL)
{
expr = parse_expression (typename);
- old_chain = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+ old_chain = make_cleanup (free_current_contents, &expr);
if (expr->elts[0].opcode == OP_TYPE)
{
/* The user expression names a type directly, just use that type. */
Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.4
diff -u -r1.4 utils.c
--- utils.c 2000/03/04 02:23:06 1.4
+++ utils.c 2000/03/19 21:59:08
@@ -375,10 +375,9 @@
to arrange to free the object thus allocated. */
void
-free_current_contents (location)
- char **location;
+free_current_contents (void *arg)
{
- free (*location);
+ free (*(void **)arg);
}
/* Provide a known function that does nothing, to use as a base for
Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.6
diff -u -r1.6 valops.c
--- valops.c 2000/03/13 10:01:23 1.6
+++ valops.c 2000/03/19 21:59:11
@@ -1370,7 +1370,7 @@
noprocess ();
inf_status = save_inferior_status (1);
- old_chain = make_cleanup ((make_cleanup_func) restore_inferior_status,
+ old_chain = make_cleanup (restore_inferior_status,
inf_status);
/* PUSH_DUMMY_FRAME is responsible for saving the inferior registers
Index: varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/varobj.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 varobj.c
--- varobj.c 2000/02/03 04:14:36 1.1.1.1
+++ varobj.c 2000/03/19 21:59:13
@@ -174,7 +174,7 @@
static struct varobj *new_root_variable PARAMS ((void));
-static void free_variable PARAMS ((struct varobj * var));
+static void free_variable (void *);
static struct type *get_type PARAMS ((struct varobj * var));
@@ -410,7 +410,7 @@
/* Fill out a varobj structure for the (root) variable being constructed. */
var = new_root_variable ();
- old_chain = make_cleanup ((make_cleanup_func) free_variable, var);
+ old_chain = make_cleanup (free_variable, var);
if (expression != NULL)
{
@@ -1322,9 +1322,10 @@
/* Free any allocated memory associated with VAR. */
static void
-free_variable (var)
- struct varobj *var;
+free_variable (void *arg)
{
+ struct varobj *var = (struct varobj *) arg;
+
/* Free the expression if this is a root variable. */
if (var->root->rootvar == var)
{
Index: xcoffread.c
===================================================================
RCS file: /cvs/src/src/gdb/xcoffread.c,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 xcoffread.c
--- xcoffread.c 1999/12/07 03:56:07 1.1.1.9
+++ xcoffread.c 2000/03/19 21:59:15
@@ -2743,7 +2743,7 @@
back_to = make_cleanup (really_free_pendings, 0);
init_minimal_symbol_collection ();
- make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ make_cleanup (discard_minimal_symbols, 0);
/* Now that the symbol table data of the executable file are all in core,
process them and define symbols accordingly. */
From kettenis@wins.uva.nl Sun Mar 19 14:55:00 2000
From: Mark Kettenis <kettenis@wins.uva.nl>
To: eliz@is.elta.co.il
Cc: jimb@zwingli.cygnus.com, gdb-patches@sourceware.cygnus.com
Subject: Re: RFA: minor watchpoint code cleanup
Date: Sun, 19 Mar 2000 14:55:00 -0000
Message-id: <200003192255.e2JMtcs00643@delius.kettenis.local>
References: <200003180006.TAA26919@zwingli.cygnus.com> <200003190944.EAA07454@indy.delorie.com>
X-SW-Source: 2000-03/msg00353.html
Content-length: 808
Date: Sun, 19 Mar 2000 04:44:56 -0500 (EST)
From: Eli Zaretskii <eliz@delorie.com>
> This is just a cosmetic change. Let me know.
>
> 2000-03-17 Jim Blandy <jimb@redhat.com>
>
> * i386v-nat.c (i386_insert_nonaligned_watchpoint): Use a
> two-dimensional array, instead of faking it with explicit index
> arithmetic.
While we are talking: someone (H.J. Lu?) suggested to make the
watchpoint insertion code common to all x86 targets. What's the
current say-so on this?
I haven't yet looked into the HW watchpoints yet. We probably could
use the same logic for choosing the appropriate debug registers, but
the way the registers are accessed wil differ considerably among the
various i386 targets. When fiddling the code we should keep
multi-arch in mind.
Mark
From kettenis@wins.uva.nl Sun Mar 19 15:11:00 2000
From: Mark Kettenis <kettenis@wins.uva.nl>
To: jimb@zwingli.cygnus.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: Linux sigtramp detection code moved to its proper place
Date: Sun, 19 Mar 2000 15:11:00 -0000
Message-id: <200003192311.e2JNBI900709@delius.kettenis.local>
References: <200003162241.RAA19616@zwingli.cygnus.com> <1000316225504.ZM3009@ocotillo.lan> <npsnxp8ix6.fsf@zwingli.cygnus.com>
X-SW-Source: 2000-03/msg00354.html
Content-length: 255
From: Jim Blandy <jimb@zwingli.cygnus.com>
Date: 17 Mar 2000 15:01:57 -0500
I'm sorry --- this is obviously a tdep issue. Does the following
change look better?
Sure! But could you please add i386-linux-tdep.c to the CVS
repository?
Mark
From ac131313@cygnus.com Sun Mar 19 18:00:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH] Support for building with DJGPP
Date: Sun, 19 Mar 2000 18:00:00 -0000
Message-id: <38D58623.3FBFFE30@cygnus.com>
References: <200003191224.HAA08367@indy.delorie.com>
X-SW-Source: 2000-03/msg00355.html
Content-length: 455
Eli Zaretskii wrote:
>
> I committed today the following patches which allow to build GDB with
> DJGPP tools.
>
> 2000-03-17 Eli Zaretskii <eliz@is.elta.co.il>
>
> * config/djgpp/djconfig.sh: New file.
> * config/djgpp/config.sed: New file.
> * config/djgpp/README: New file.
> * config/djgpp/fnchange.lst: New file.
> * config/djgpp/djcheck.sh: New file.
>
I'd also add an entry to gdb/NEWS. (Yaa)
Andrew
From ac131313@cygnus.com Sun Mar 19 20:56:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH] Add change-log variables to more MI files
Date: Sun, 19 Mar 2000 20:56:00 -0000
Message-id: <38D5AF42.748BB2F5@cygnus.com>
References: <38CDC788.D9C8FE12@cygnus.com> <200003140932.EAA28159@indy.delorie.com>
X-SW-Source: 2000-03/msg00356.html
Content-length: 614
Eli Zaretskii wrote:
>
> > I've checked in the attatched. It should help keep ChangeLog entries
> > local.
> [snip]
> > +
> > + # Local variables:
> > + # change-log-default-name: "ChangeLog-mi"
> > + # End:
>
> You _are_ aware that ChangeLog and ChangeLog-mi both map to the same
> name "changelo" when truncated to 8+3 limits, right?
Yes, along with ChangeLog-99, ChangeLog-gdbtk et.al. I copied an
existing convention.
> Is it conceivable to rename ChangeLog-mi to ChangeLog.mi or
> mi-ChangeLog?
If we're going to do that then we should rename all the ChangeLog files
to be:
ChangeLog.<suffix>
Andrew
From ac131313@cygnus.com Sun Mar 19 21:29:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Stephane Carrez <Stephane.Carrez@worldnet.fr>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: path for gdb/dwarf2read.c, support 16-bit targets in dwarf-2
Date: Sun, 19 Mar 2000 21:29:00 -0000
Message-id: <38D5B6E0.50FF6A5E@cygnus.com>
References: <38D4DCB0.88313CB2@worldnet.fr>
X-SW-Source: 2000-03/msg00357.html
Content-length: 461
Stephane Carrez wrote:
>
> Hi!
>
> One part of the patch for dwarf2 correction with 16-bit target has
> been lost. If you are still not convinced by the fix, have a look
> at gas/dwarf2dbg.c in out_set_addr() where we obtain the address
> size in a good way.
>
> Can you integrate it?
FYI,
My reading of the thread from when this patch was last posted is that it
wasn't clear that this was a bug and the change was the correct thing to
do.
Enjoy,
Andrew
From ac131313@cygnus.com Sun Mar 19 21:31:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH] "make install" in mmalloc to work on MS-DOS
Date: Sun, 19 Mar 2000 21:31:00 -0000
Message-id: <38D5B78B.9D272F09@cygnus.com>
References: <200003191215.HAA08359@indy.delorie.com>
X-SW-Source: 2000-03/msg00358.html
Content-length: 989
Eli Zaretskii wrote:
>
> The following patch is required so that "make install" would work on
> filesystems where libmmalloc.a.n is not a valid file name.
>
> Okay to commit?
>
> 2000-03-17 Eli Zaretskii <eliz@is.elta.co.il>
>
> * Makefile.in (install): Append "n", not ".n" to libmmalloc.a,
> since the latter loses on DOS 8+3 filesystems.
>
> --- mmalloc/Makefile.i~0 Fri Apr 16 03:55:28 1999
> +++ mmalloc/Makefile.in Fri Mar 17 14:32:50 2000
> @@ -121,9 +121,9 @@
> # ./a.out
>
> install: all
> - $(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB).n
> - $(RANLIB) $(libdir)/$(TARGETLIB).n
> - mv -f $(libdir)/$(TARGETLIB).n $(libdir)/$(TARGETLIB)
> + $(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB)n
> + $(RANLIB) $(libdir)/$(TARGETLIB)n
> + mv -f $(libdir)/$(TARGETLIB)n $(libdir)/$(TARGETLIB)
Fine with me. I suspect no one will notice :-)
Andrew
From ac131313@cygnus.com Sun Mar 19 22:01:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Philippe De Muyter <phdm@macqel.be>, Elena Zannoni <ezannoni@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: HAVE_POLL is not enough - RFA
Date: Sun, 19 Mar 2000 22:01:00 -0000
Message-id: <38D5BE1D.7BB02C99@cygnus.com>
References: <200003181028.LAA30913@mail.macqel.be>
X-SW-Source: 2000-03/msg00359.html
Content-length: 718
Philippe De Muyter wrote:
>
> I implemented the runtime poll/select selection. The patch seems huge because
> of the indentation changes caused by replacing
> #if HAVE_POLL
> some_code
> #else
> some_other_code
> #endif
>
> by
>
> #if HAVE_POLL
> if (!use_select)
> {
> some_code
> }
> else
> #endif
> {
> some_other_code
> }
Um, to wear the hat of the style police (... :-) I'd suggest instead
codeing it as:
if (use_poll)
{
#if HAVE_POLL
...
#else
internal_error (...);
#endif
}
else
{
}
or even as a psuedo object with a bunch of methods:
some_struct.what_are_we_doing (args);
Andrew
From Philippe.Giacinti@sxb.bsf.alcatel.fr Sun Mar 19 22:19:00 2000
From: Philippe GIACINTI <Philippe.Giacinti@sxb.bsf.alcatel.fr>
To: gdb-patches@sourceware.cygnus.com
Subject: [PATCH] minor fixes in remote.c
Date: Sun, 19 Mar 2000 22:19:00 -0000
Message-id: <14549.49859.878539.158465@gargle.gargle.HOWL>
X-SW-Source: 2000-03/msg00360.html
Content-length: 641
Hi,
Here is a patch including minor fixes in file gdb/remote.c:
* remote.c (record_currthread): must call `set_thread' to change
general thread, in order to let stub know we have changed it.
* remote.c (remote_read_bytes): when we need to read more memory
than max buffer size, we have to reserve space for leading $ and
trailing # + checksum (i.e.: 4 char)
Best regards.
--
Philippe Giacinti - Alcatel Business Systems - PCD/SMB/SWPCC - CC S0645
1, route du Dr Albert Schweitzer - 67408 Illkirch Cedex - FRANCE
Tel: +33 (0)3.90.67.62.10 - Fax: +33 (0)3.90.67.77.93
mailto:Philippe.Giacinti@sxb.bsf.alcatel.fr
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: thumb_skip_prologue too adventurous
2000-03-19 12:29 ` Jonathan Larmour
@ 2000-03-24 12:46 ` Jonathan Larmour
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Larmour @ 2000-03-24 12:46 UTC (permalink / raw)
To: fnasser; +Cc: gdb-patches
In article < 38D5389B.6A481BFA@redhat.co.uk > I wrote:
>Fernando Nasser wrote:
>> I am not sure if there isn't a better solution for this, but for now I
>> would say that you should check your change in as an emergency fix.
>
>I don't have checkin rights to the "src" repository, so I'd be grateful if
>you could do this for me.
I now have checkin rights. Is it therefore okay for me to check the thumb
patch in?
And add the new test below? [ left included in its entirety ]
Jifl
>> I
>> am assuming you ran the testsuite and it did not cause any regressions,
>> right? (I don't think it will cause any)
>
>Nope - no regressions.
>
>> I may latter add another change to check first if there is information
>> about the prologue end in the symbol table. I don't know why this was
>> not checked before, I just noticed it now, looking at you patch.
>
>Don't worry - it is checked, but it is done in arm_skip_prologue, before
>thumb_skip_prologue is called.
>
>> I wrote this thumb prologue scan code to match the new compiler (gcc)
>> prologue generation. As everything is new, both Nick and I used the
>> testsuite results to verify our work. The case you mention does not have
>> a testsuite case. I wonder if you could add a test case?
>
>I've never done a GDB testcase before, but here goes - I've attached one. It
>runs at the end of break.exp. The complication is that we need to start
>over, because the problematic programs are the ones compiled with
>optimization. So we have to jump through all the same hoops as at the start
>of the file. Some of this stuff might be overkill, but it definitely seems
>to work.
>
>I agree the addition of this test is A Good Thing as we've had these types
>of problems before on other targets with optimized code.
>
>Hope this helps. Obviously let me know if there are any problems with it.
>
>Jifl
>
>2000-03-19 Jonathan Larmour <jlarmour@redhat.co.uk>
>
> * gdb.base/break.exp: Add new test for setting breakpoints on
> optimized code so we can test breakpoints work even when function
> prologues may be optimized away
>
>
>--
>Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
>"Plan to be spontaneous tomorrow." || These opinions are all my own fault
>-=-=-=-=-=-
>
>Index: gdb/testsuite/gdb.base/break.exp
>===================================================================
>RCS file: /cvs/src/src/gdb/testsuite/gdb.base/break.exp,v
>retrieving revision 1.2
>diff -u -5 -p -r1.2 break.exp
>--- gdb/testsuite/gdb.base/break.exp 2000/02/16 00:11:07 1.2
>+++ gdb/testsuite/gdb.base/break.exp 2000/03/19 20:26:34
>@@ -799,10 +799,83 @@ proc test_next_with_recursion {} {
> }
>
> test_clear_command
> test_next_with_recursion
>
>+
>+#********
>+
>+# build a new file with optimization enabled so that we can try breakpoints
>+# on targets with optimized prologues
>+
>+set binfileo2 ${objdir}/${subdir}/${testfile}o2
>+
>+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfileo2}" executable {debug additional_flags="-O2" }] != "" } {
>+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
>+}
>+
>+if [get_compiler_info ${binfileo2}] {
>+ return -1
>+}
>+
>+gdb_exit
>+gdb_start
>+gdb_reinitialize_dir $srcdir/$subdir
>+gdb_load ${binfileo2}
>+
>+if [target_info exists gdb_stub] {
>+ gdb_step_for_stub;
>+}
>+
>+#
>+# test break at function
>+#
>+gdb_test "break main" \
>+ "Breakpoint.*at.* file .*$srcfile, line.*" \
>+ "breakpoint function, optimized file"
>+
>+#
>+# test break at function
>+#
>+gdb_test "break marker4" \
>+ "Breakpoint.*at.* file .*$srcfile, line.*" \
>+ "breakpoint small function, optimized file"
>+
>+#
>+# run until the breakpoint at main is hit. For non-stubs-using targets.
>+#
>+if ![target_info exists use_gdb_stub] {
>+ if [istarget "*-*-vxworks*"] then {
>+ send_gdb "run vxmain \"2\"\n"
>+ set timeout 120
>+ verbose "Timeout is now $timeout seconds" 2
>+ } else {
>+ send_gdb "run\n"
>+ }
>+ gdb_expect {
>+ -re "The program .* has been started already.*y or n. $" {
>+ send_gdb "y\n"
>+ exp_continue
>+ }
>+ -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:75.*75\[\t \]+if .argc.* \{.*$gdb_prompt $"\
>+ { pass "run until function breakpoint, optimized file" }
>+ -re ".*$gdb_prompt $" { fail "run until function breakpoint, optimized file" }
>+ timeout { fail "run until function breakpoint, optimized file (timeout)" }
>+ }
>+} else {
>+ if ![target_info exists gdb_stub] {
>+ gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:75.*75\[\t \]+if .argc.*\{.*" "stub continue, optimized file"
>+ }
>+}
>+
>+#
>+# run until the breakpoint at a small function
>+#
>+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile:51.*51\[\t \]+void.*marker4.*" \
>+ "run until breakpoint set at small function, optimized file"
>+
>+
> # Reset the default arguments for VxWorks
> if [istarget "*-*-vxworks*"] {
> set timeout 10
> verbose "Timeout is now $timeout seconds" 2
> send_gdb "set args main\n"
>
>-=-=-=-=-=-
^ permalink raw reply [flat|nested] 4+ messages in thread
* thumb_skip_prologue too adventurous
2000-03-18 14:14 thumb_skip_prologue too adventurous Jonathan Larmour
[not found] ` <38D40052.AF731E81@redhat.co.uk>
@ 2000-04-01 0:00 ` Jonathan Larmour
1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Larmour @ 2000-04-01 0:00 UTC (permalink / raw)
To: fnasser; +Cc: gdb-patches
Hi Fernando,
You checked in the following change to arm-tdep.c:
revision 1.46
date: 2000/01/28 15:32:04; author: fnasser; state: Exp; lines: +84 -22
2000-01-28 Fernando Nasser <fnasser@totem.to.cygnus.com>
* arm-tdep.c (thumb_skip_prologue, thumb_scan_prologue): Add
support for new style thumb prologues.
However this has broken small functions, e.g. void foo() { for (;;); } etc.
because such functions contain no prologue. e.g. for foo(), there is only
one instruction which is a branch to itself. However thumb_skip_prologue
will continue past the end of this small function and into the next one.
Thus breakpoints, etc. get set in completely the wrong place.
The essential issue is that thumb_skip_prologue must not be allowed to
continue on after the end of the function, even if it hasn't found the
prologue.
The attached patch certainly fixes things for me, but I'm not sure if it's
the right answer. If it is, please check it in; if not, tell me what I
should do :-).
Thanks,
Jifl
2000-03-18 Jonathan Larmour <jlarmour@redhat.co.uk>
* arm-tdep.c (thumb_skip_prologue): Take function end addr argument
so that we can stop searching for the prologue past the function end
(arm_skip_prologue): Call thumb_skip_prologue with function end addr
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault
From green@cygnus.com Sat Apr 01 00:00:00 2000
From: Anthony Green <green@cygnus.com>
To: Daniel Berlin <dan@cgsoftware.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: Generic g++ exception catch/throw support
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <rlputaujdk.fsf@hoser.cygnus.com>
References: <Pine.LNX.4.10.10001251034001.10773-200000@propylaea.anduin.com>
X-SW-Source: 2000-q1/msg00516.html
Content-length: 774
Daniel wrote:
> Using this patch, you can get generic g++ exception catch/throw support
> (using catch catch and catch throw).
Some comments...
* This won't work on platforms using sjlj exceptions. throw_helper
only exists on targets using PC range table style exceptions.
* I don't see __start_cp_handler in the mainline libgcc sources. Is
this something special in the BeOS libgcc?
* Once these issues are sorted out, the GCC people should be told that
gdb intends to use these functions as hooks. We can comment the
libgcc sources then to make sure people think twice before
modifying them.
AG
--
Anthony Green Red Hat
Sunnyvale, California
From fche@cygnus.com Sat Apr 01 00:00:00 2000
From: fche@cygnus.com (Frank Ch. Eigler)
To: gdb-patches@sourceware.cygnus.com
Cc: jlarmour@redhat.co.uk
Subject: Re: [PATCH] sparclite sim: make buffer_read_memory match prototype
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <o5ya809jxm.fsf@toenail.to.cygnus.com>
References: <38BFBABB.2FED863B@redhat.co.uk>
X-SW-Source: 2000-q1/msg00472.html
Content-length: 67
> [erc32 buffer_read_memory patch]
Thanks, it's in.
- FChE
From cgf@cygnus.com Sat Apr 01 00:00:00 2000
From: cgf@cygnus.com (Chris Faylor)
To: gdb-patches@sourceware.cygnus.com
Subject: Re: dlclose()
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <88qer9$lbd$1@cronkite.cygnus.com>
References: <200002161953.OAA07411@devserv.devel.redhat.com> <200002200521.AAA29598@devserv.devel.redhat.com> <88nurn$e4d$1@cronkite.cygnus.com> <b7lfzhkj6.fsf@rtl.cygnus.com>
X-SW-Source: 2000-q1/msg00266.html
Content-length: 1805
In article < b7lfzhkj6.fsf@rtl.cygnus.com >,
Jim Kingdon <kingdon@redhat.com> wrote:
>I'd probably argue that the distributed testing resulting from getting
>patches checked in is more effective QA than getting obsessed with
>testsuites but that isn't really the point in the sense that I'd like
>to see both.
Since running the testsuite should be a relatively trivial sanity test I
don't see why you would even raise the issue of "getting obsessed".
For the record *I'd* like to see people run a test suite on their
machine before a patch even makes it to gdb-patches. I don't see any
reason why you would expect somebody else to take time to test out your
potentially buggy patch submissions.
We've already seen at least one recent case where a test suite run prior
to an overly optimistic check-in would probably have saved people from
breakage. I would think that that was argument enough for adopting this
practice.
"Distributed testing" means "distributed confusion" when problem source
code makes it into the repository. It means that we will invariably see
the same problem reported to various gdb mailing lists multiple times.
That means more work for the people who report the problem as well as
more work for people who are responding to the people who report the
problem.
Of course it is inevitable that there will be breakage when somebody
checks in a patch. However, if we have a tool for reducing the
potential for breakage even slightly, we should use it. At Cygnus/Red
Hat, we actually have a policy that no checkins are to be made without
checking a test suite run for regressions for just this reason.
--
cgf@cygnus.com Cygnus Solutions, a Red Hat company
http://sourcware.cygnus.com/ http://www.redhat.com/
From jtc@redback.com Sat Apr 01 00:00:00 2000
From: jtc@redback.com (J.T. Conklin)
To: gdb-patches@sourceware.cygnus.com
Subject: patch: convert gdbserver to autoconf, add netbsd/i386 support
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <5mn1p88ma8.fsf@jtc.redbacknetworks.com>
X-SW-Source: 2000-q1/msg00119.html
Content-length: 63369
Some time ago I submitted a patch that converted gdbserver to autoconf
with the following note.
"While adding support for NetBSD systems to gdbserver, I noticed that
gdbserver's configure.in had some significant errors in addition to
still being Cygnus configure.
The first problem was if ../config/${hostfile} was present, it would
be linked to xm.h instead of ../config/${gdb_host_cpu}/${hostfile}.
The same with targetfile and nativefile.
GDB used to do the same thing three or four years back, but that was
changed so processor specific headers could inherit from OS specific
headers for those OS's that supported multiple architectures (at the
time, lynxos and possibly svr4. Now there is *bsd and linux as well).
The second problem was that the names of the host, target, and native
headers were extracted from the host and target makefile stub with awk
and assumed that the variable definitions would have whitespace follow-
ing the equals sign in the assignment. This restriction was lifted for
GDB years ago as well, so there is a some risk that *.mh and *.mt files
that work fine with GDB won't work with gdbserver.
And by the time I fixed the above issues, it seemed trivial enough to
go the next step and convert everything to use autoconf. The enclosed
patch contains those changes."
My plan was to first do the autoconf conversion, and then submit a
follow up patch that added netbsd support.
Unfortunately, that patch had some problems, and although Stan and I
bounced around some email trying to get them resolved, it eventually
dropped to the bottom of our respective piles.
I picked up the pieces earlier in the week. I did both the autoconf
conversion and the netbsd/i386 support together, which should ensure
that the end result will work this time. Support for most of the
other netbsd ports will follow soon.
I used autoconf 2.12 to generate the gdbserver/configure script. If
there's a more official version, feel free to re-generate it.
--jtc
2000-02-10 J.T. Conklin <jtc@redback.com>
* config/i386/nbsd.mt (GDBSERVER_DEPFILES): Add low-nbsd.o
* configure.tgt (i[3456]86-*-netbsd*): add gdbserver to
configdirs.
* gdbserver/low-nbsd.c: New file.
* gdbserver/Makefile.in: convert to autoconf.
* gdbserver/configure.in: likewise.
* gdbserver/configure: generate.
Index: gdb/gdb/configure.tgt
diff -c gdb/gdb/configure.tgt:1.13 gdb/gdb/configure.tgt:1.14
*** gdb/gdb/configure.tgt:1.13 Thu Feb 10 18:35:17 2000
--- gdb/gdb/configure.tgt Thu Feb 10 18:35:17 2000
***************
*** 86,92 ****
i[3456]86-*-aix*) gdb_target=i386aix ;;
i[3456]86-*-bsd*) gdb_target=i386bsd ;;
i[3456]86-*-freebsd*) gdb_target=fbsd ;;
! i[3456]86-*-netbsd*) gdb_target=nbsd ;;
i[3456]86-*-os9k) gdb_target=i386os9k ;;
i[3456]86-*-go32*) gdb_target=i386aout ;;
i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
--- 86,93 ----
i[3456]86-*-aix*) gdb_target=i386aix ;;
i[3456]86-*-bsd*) gdb_target=i386bsd ;;
i[3456]86-*-freebsd*) gdb_target=fbsd ;;
! i[3456]86-*-netbsd*) gdb_target=nbsd
! configdirs="${configdirs} gdbserver" ;;
i[3456]86-*-os9k) gdb_target=i386os9k ;;
i[3456]86-*-go32*) gdb_target=i386aout ;;
i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
Index: gdb/gdb/config/i386/nbsd.mt
diff -c gdb/gdb/config/i386/nbsd.mt:1.1.1.1 gdb/gdb/config/i386/nbsd.mt:1.2
*** gdb/gdb/config/i386/nbsd.mt:1.1.1.1 Wed May 19 10:39:05 1999
--- gdb/gdb/config/i386/nbsd.mt Thu Feb 10 18:35:26 2000
***************
*** 1,3 ****
--- 1,5 ----
# Target: Intel 386 running NetBSD
TDEPFILES= i386-tdep.o i387-tdep.o solib.o
TM_FILE= tm-nbsd.h
+
+ GDBSERVER_DEPFILES= low-nbsd.o
Index: gdb/gdb/gdbserver/Makefile.in
diff -c gdb/gdb/gdbserver/Makefile.in:1.1.1.3 gdb/gdb/gdbserver/Makefile.in:1.2
*** gdb/gdb/gdbserver/Makefile.in:1.1.1.3 Thu Nov 11 16:51:10 1999
--- gdb/gdb/gdbserver/Makefile.in Thu Feb 10 18:35:36 2000
***************
*** 1,4 ****
! #Copyright 1989, 90, 91, 92, 93, 94, 95, 96, 1997
#Free Software Foundation, Inc.
# This file is part of GDB.
--- 1,4 ----
! #Copyright 1989, 90, 91, 92, 93, 94, 95, 96, 97, 99, 2000
#Free Software Foundation, Inc.
# This file is part of GDB.
***************
*** 17,32 ****
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
! prefix = /usr/local
! program_transform_name =
! exec_prefix = $(prefix)
! bindir = $(exec_prefix)/bin
! libdir = $(exec_prefix)/lib
tooldir = $(libdir)/$(target_alias)
! datadir = $(prefix)/share
! mandir = $(prefix)/man
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
--- 17,34 ----
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
! prefix = @prefix@
! exec_prefix = @exec_prefix@
! host_alias = @host_alias@
! target_alias = @target_alias@
! program_transform_name = @program_transform_name@
! bindir = @bindir@
! libdir = @libdir@
tooldir = $(libdir)/$(target_alias)
! datadir = @datadir@
! mandir = @mandir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
***************
*** 36,50 ****
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
! infodir = $(prefix)/info
htmldir = $(prefix)/html
! includedir = $(prefix)/include
SHELL = /bin/sh
! INSTALL = `cd $(srcdir)/../..;pwd`/install-sh -c
! INSTALL_PROGRAM = $(INSTALL)
! INSTALL_DATA = $(INSTALL)
AR = ar
AR_FLAGS = qv
--- 38,52 ----
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
! infodir = @infodir@
htmldir = $(prefix)/html
! includedir = @includedir@
SHELL = /bin/sh
! INSTALL = @INSTALL@
! INSTALL_PROGRAM = @INSTALL_PROGRAM@
! INSTALL_DATA = @INSTALL_DATA@
AR = ar
AR_FLAGS = qv
***************
*** 61,67 ****
# Directory containing source files. Don't clean up the spacing,
# this exact string is matched for by the "configure" script.
! srcdir = .
# It is also possible that you will need to add -I/usr/include/sys to the
# CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
--- 63,70 ----
# Directory containing source files. Don't clean up the spacing,
# this exact string is matched for by the "configure" script.
! srcdir = @srcdir@
! VPATH = @srcdir@
# It is also possible that you will need to add -I/usr/include/sys to the
# CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
***************
*** 117,130 ****
LINTFLAGS= $(BFD_CFLAGS)
# Host and target-dependent makefile fragments come in here.
! ####
# End of host and target-dependent makefile fragments
# All source files that go into linking GDB remote server.
! SFILES = $(srcdir)/low-lynx.c $(srcdir)/low-sparc.c $(srcdir)/low-sun3.c \
! $(srcdir)/low-hppabsd.c \
! $(srcdir)/utils.c $(srcdir)/server.c $(srcdir)/remote-utils.c
DEPFILES = $(GDBSERVER_DEPFILES)
--- 120,135 ----
LINTFLAGS= $(BFD_CFLAGS)
# Host and target-dependent makefile fragments come in here.
! @host_makefile_frag@
! @target_makefile_frag@
# End of host and target-dependent makefile fragments
# All source files that go into linking GDB remote server.
! SFILES = $(srcdir)/low-hppabsd.c $(srcdir)/low-linux.c $(srcdir)/low-lynx.c \
! $(srcdir)/low-nbsd.c $(srcdir)/low-sim.c $(srcdir)/low-sparc.c \
! $(srcdir)/low-sun3.c $(srcdir)/utils.c $(srcdir)/server.c \
! $(srcdir)/remote-utils.c
DEPFILES = $(GDBSERVER_DEPFILES)
***************
*** 175,184 ****
${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbreplay gdbreplay.o \
$(XM_CLIBS)
- config.status:
- @echo "You must configure gdbserver. Look at the README file for details."
- @false
-
# Put the proper machine-specific files first, so M-. on a machine
# specific routine gets the one for the correct machine.
# The xyzzy stuff below deals with empty DEPFILES
--- 180,185 ----
***************
*** 196,202 ****
clean:
rm -f *.o ${ADD_FILES} *~
! rm -f gdbserver core make.log
distclean: clean
rm -f nm.h tm.h xm.h config.status
--- 197,203 ----
clean:
rm -f *.o ${ADD_FILES} *~
! rm -f gdbserver gdbreplay core make.log
distclean: clean
rm -f nm.h tm.h xm.h config.status
***************
*** 208,216 ****
STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
! Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
$(SHELL) ./config.status
force:
version.c: Makefile
--- 209,220 ----
STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
! Makefile: Makefile.in config.status @frags@
$(SHELL) ./config.status
+ config.status: configure
+ $(SHELL) ./config.status --recheck
+
force:
version.c: Makefile
***************
*** 236,241 ****
--- 240,246 ----
remote-utils.o : ${srcdir}/remote-utils.c ${srcdir}/server.h
low-linux.o : ${srcdir}/low-linux.c ${srcdir}/server.h
low-lynx.o : ${srcdir}/low-lynx.c ${srcdir}/server.h
+ low-nbsd.o : ${srcdir}/low-nbsd.c ${srcdir}/server.h
low-sim.o : ${srcdir}/low-sim.c ${srcdir}/server.h
low-sparc.o : $(srcdir)/low-sparc.c $(srcdir)/server.h
low-sun3.o : $(srcdir)/low-sun3.c $(srcdir)/server.h
Index: gdb/gdb/gdbserver/configure
diff -c /dev/null gdb/gdb/gdbserver/configure:1.1
*** /dev/null Thu Feb 10 18:35:36 2000
--- gdb/gdb/gdbserver/configure Thu Feb 10 18:35:36 2000
***************
*** 0 ****
--- 1,1078 ----
+ #! /bin/sh
+
+ # Guess values for system-dependent variables and create Makefiles.
+ # Generated automatically using autoconf version 2.12
+ # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+ #
+ # This configure script is free software; the Free Software Foundation
+ # gives unlimited permission to copy, distribute and modify it.
+
+ # Defaults:
+ ac_help=
+ ac_default_prefix=/usr/local
+ # Any additions from configure.in:
+
+ # Initialize some variables set by options.
+ # The variables have the same names as the options, with
+ # dashes changed to underlines.
+ build=NONE
+ cache_file=./config.cache
+ exec_prefix=NONE
+ host=NONE
+ no_create=
+ nonopt=NONE
+ no_recursion=
+ prefix=NONE
+ program_prefix=NONE
+ program_suffix=NONE
+ program_transform_name=s,x,x,
+ silent=
+ site=
+ srcdir=
+ target=NONE
+ verbose=
+ x_includes=NONE
+ x_libraries=NONE
+ bindir='${exec_prefix}/bin'
+ sbindir='${exec_prefix}/sbin'
+ libexecdir='${exec_prefix}/libexec'
+ datadir='${prefix}/share'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+ localstatedir='${prefix}/var'
+ libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+
+ # Initialize some other variables.
+ subdirs=
+ MFLAGS= MAKEFLAGS=
+ # Maximum number of lines to put in a shell here document.
+ ac_max_here_lines=12
+
+ ac_prev=
+ for ac_option
+ do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+ Usage: configure [options] [host]
+ Options: [defaults in brackets after descriptions]
+ Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+ Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+ EOF
+ cat << EOF
+ Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+ Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+ EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.12"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+ done
+
+ if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+ fi
+
+ trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+ # File descriptor usage:
+ # 0 standard input
+ # 1 file creation
+ # 2 errors and warnings
+ # 3 some systems may open it to /dev/tty
+ # 4 used on the Kubota Titan
+ # 6 checking for... messages and results
+ # 5 compiler messages saved in config.log
+ if test "$silent" = yes; then
+ exec 6>/dev/null
+ else
+ exec 6>&1
+ fi
+ exec 5>./config.log
+
+ echo "\
+ This file contains any messages produced by compilers while
+ running configure, to aid debugging if configure makes a mistake.
+ " 1>&5
+
+ # Strip out --no-create and --no-recursion so they do not pile up.
+ # Also quote any args containing shell metacharacters.
+ ac_configure_args=
+ for ac_arg
+ do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+ done
+
+ # NLS nuisances.
+ # Only set these to C if already set. These must not be set unconditionally
+ # because not all systems understand e.g. LANG=C (notably SCO).
+ # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+ # Non-C LC_CTYPE values break the ctype check.
+ if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+ if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+ if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+ # confdefs.h avoids OS command line length limits that DEFS can exceed.
+ rm -rf conftest* confdefs.h
+ # AIX cpp loses on an empty file, so make sure it contains at least a newline.
+ echo > confdefs.h
+
+ # A filename unique to this package, relative to the directory that
+ # configure is in, which we can look for to find out if srcdir is correct.
+ ac_unique_file=server.c
+
+ # Find the source files, if location was not specified.
+ if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+ else
+ ac_srcdir_defaulted=no
+ fi
+ if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+ fi
+ srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+ # Prefer explicitly selected file to automatically selected ones.
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+ fi
+ for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+ done
+
+ if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+ else
+ echo "creating cache $cache_file"
+ > $cache_file
+ fi
+
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+
+ if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+ ' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+ else
+ ac_n= ac_c='\c' ac_t=
+ fi
+
+
+
+ ac_aux_dir=
+ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+ done
+ if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+ fi
+ ac_config_guess=$ac_aux_dir/config.guess
+ ac_config_sub=$ac_aux_dir/config.sub
+ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+ # Do some error checking and defaulting for the host and target type.
+ # The inputs are:
+ # configure --host=HOST --target=TARGET --build=BUILD NONOPT
+ #
+ # The rules are:
+ # 1. You are not allowed to specify --host, --target, and nonopt at the
+ # same time.
+ # 2. Host defaults to nonopt.
+ # 3. If nonopt is not specified, then host defaults to the current host,
+ # as determined by config.guess.
+ # 4. Target and build default to nonopt.
+ # 5. If nonopt is not specified, then target and build default to host.
+
+ # The aliases save the names the user supplied, while $host etc.
+ # will get canonicalized.
+ case $host---$target---$nonopt in
+ NONE---*---* | *---NONE---* | *---*---NONE) ;;
+ *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+ esac
+
+
+ # Make sure we can run config.sub.
+ if $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+ fi
+
+ echo $ac_n "checking host system type""... $ac_c" 1>&6
+ echo "configure:570: checking host system type" >&5
+
+ host_alias=$host
+ case "$host_alias" in
+ NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`$ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ host=`$ac_config_sub $host_alias`
+ host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ echo "$ac_t""$host" 1>&6
+
+ echo $ac_n "checking target system type""... $ac_c" 1>&6
+ echo "configure:591: checking target system type" >&5
+
+ target_alias=$target
+ case "$target_alias" in
+ NONE)
+ case $nonopt in
+ NONE) target_alias=$host_alias ;;
+ *) target_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ target=`$ac_config_sub $target_alias`
+ target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ echo "$ac_t""$target" 1>&6
+
+ echo $ac_n "checking build system type""... $ac_c" 1>&6
+ echo "configure:609: checking build system type" >&5
+
+ build_alias=$build
+ case "$build_alias" in
+ NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ build=`$ac_config_sub $build_alias`
+ build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ echo "$ac_t""$build" 1>&6
+
+ test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+ # Find a good install program. We prefer a C program (faster),
+ # so one script is as good as another. But avoid the broken or
+ # incompatible versions:
+ # SysV /etc/install, /usr/sbin/install
+ # SunOS /usr/etc/install
+ # IRIX /sbin/install
+ # AIX /bin/install
+ # AFS /usr/afsws/bin/install, which mishandles nonexistent args
+ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+ # ./install, which can be erroneously created by make from ./install.sh.
+ echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+ echo "configure:642: checking for a BSD compatible install" >&5
+ if test -z "$INSTALL"; then
+ if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ for ac_prog in ginstall installbsd scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ # OSF/1 installbsd also uses dspmsg, but is usable.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+ fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+ fi
+ echo "$ac_t""$INSTALL" 1>&6
+
+ # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+ # It thinks the first close brace ends the variable substitution.
+ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+ . ${srcdir}/../configure.host
+
+ . ${srcdir}/../configure.tgt
+
+ frags=
+ host_makefile_frag=${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh
+ if test ! -f ${host_makefile_frag}; then
+ { echo "configure: error: "*** GDB remote does not support host ${host}"" 1>&2; exit 1; }
+ fi
+ frags="$frags $host_makefile_frag"
+
+ target_makefile_frag=${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt
+ if test ! -f ${target_makefile_frag}; then
+ { echo "configure: error: "*** GDB remote does not support target ${target}"" 1>&2; exit 1; }
+ fi
+ frags="$frags $target_makefile_frag"
+
+
+
+
+
+ hostfile=`sed -n '
+ s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
+ ' ${host_makefile_frag}`
+
+ targetfile=`sed -n '
+ s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
+ ' ${target_makefile_frag}`
+
+ if test "${target}" = "${host}"; then
+ nativefile=`sed -n '
+ s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
+ ' ${host_makefile_frag}`
+ fi
+
+ # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
+ # (NAT_FILE) is not set in the ?config/* file, we don't make the
+ # corresponding links. But we have to remove the xm.h files and tm.h
+ # files anyway, e.g. when switching from "configure host" to
+ # "configure none".
+
+ files=
+ links=
+ rm -f xm.h
+ rm -f ser-hardwire.c
+ if test "${hostfile}" != ""; then
+ files="${files} ../config/${gdb_host_cpu}/${hostfile}"
+ links="${links} xm.h"
+ fi
+ rm -f tm.h
+ if test "${targetfile}" != ""; then
+ files="${files} ../config/${gdb_target_cpu}/${targetfile}"
+ links="${links} tm.h"
+ fi
+ rm -f nm.h
+ if test "${nativefile}" != ""; then
+ files="${files} ../config/${gdb_host_cpu}/${nativefile}"
+ links="${links} nm.h"
+ # temporary scaffolding until all hosts have the host/target/native
+ # split in place.
+ else
+ files="${files} ../config/nm-empty.h"
+ links="${links} nm.h"
+ fi
+
+
+ trap '' 1 2 15
+ cat > confcache <<\EOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+ # scripts and configure runs. It is not useful on other systems.
+ # If it contains results you don't want to keep, you may remove or edit it.
+ #
+ # By default, configure uses ./config.cache as the cache file,
+ # creating it if it does not exist already. You can give configure
+ # the --cache-file=FILE option to use a different cache file; that is
+ # what configure does when it calls configure scripts in
+ # subdirectories, so they share the cache.
+ # Giving --cache-file=/dev/null disables caching, for debugging configure.
+ # config.status only pays attention to the cache file if you give it the
+ # --recheck option to rerun configure.
+ #
+ EOF
+ # The following way of writing the cache mishandles newlines in values,
+ # but we know of no workaround that is simple, portable, and efficient.
+ # So, don't put newlines in cache variables' values.
+ # Ultrix sh set writes to stderr and can't be redirected directly,
+ # and sets the high bit in the cache file unless we assign to the vars.
+ (set) 2>&1 |
+ case `(ac_space=' '; set) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+ if cmp -s $cache_file confcache; then
+ :
+ else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+ fi
+ rm -f confcache
+
+ trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ # Let make expand exec_prefix.
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+ # Any assignment to VPATH causes Sun make to only execute
+ # the first set of double-colon rules, so remove it if not needed.
+ # If there is a colon in the path, we need to keep it.
+ if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ fi
+
+ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+ # Transform confdefs.h into DEFS.
+ # Protect against shell expansion while executing Makefile rules.
+ # Protect against Makefile macro expansion.
+ cat > conftest.defs <<\EOF
+ s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+ s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+ s%\[%\\&%g
+ s%\]%\\&%g
+ s%\$%$$%g
+ EOF
+ DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+ rm -f conftest.defs
+
+
+ # Without the "./", some shells look in PATH for config.status.
+ : ${CONFIG_STATUS=./config.status}
+
+ echo creating $CONFIG_STATUS
+ rm -f $CONFIG_STATUS
+ cat > $CONFIG_STATUS <<EOF
+ #! /bin/sh
+ # Generated automatically by configure.
+ # Run this file to recreate the current configuration.
+ # This directory was configured as follows,
+ # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+ #
+ # $0 $ac_configure_args
+ #
+ # Compiler output produced by configure, useful for debugging
+ # configure, is in ./config.log if it exists.
+
+ ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+ for ac_option
+ do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.12"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+ done
+
+ ac_given_srcdir=$srcdir
+ ac_given_INSTALL="$INSTALL"
+
+ trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
+
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+ $ac_vpsub
+ $extrasub
+ s%@CFLAGS@%$CFLAGS%g
+ s%@CPPFLAGS@%$CPPFLAGS%g
+ s%@CXXFLAGS@%$CXXFLAGS%g
+ s%@DEFS@%$DEFS%g
+ s%@LDFLAGS@%$LDFLAGS%g
+ s%@LIBS@%$LIBS%g
+ s%@exec_prefix@%$exec_prefix%g
+ s%@prefix@%$prefix%g
+ s%@program_transform_name@%$program_transform_name%g
+ s%@bindir@%$bindir%g
+ s%@sbindir@%$sbindir%g
+ s%@libexecdir@%$libexecdir%g
+ s%@datadir@%$datadir%g
+ s%@sysconfdir@%$sysconfdir%g
+ s%@sharedstatedir@%$sharedstatedir%g
+ s%@localstatedir@%$localstatedir%g
+ s%@libdir@%$libdir%g
+ s%@includedir@%$includedir%g
+ s%@oldincludedir@%$oldincludedir%g
+ s%@infodir@%$infodir%g
+ s%@mandir@%$mandir%g
+ s%@host@%$host%g
+ s%@host_alias@%$host_alias%g
+ s%@host_cpu@%$host_cpu%g
+ s%@host_vendor@%$host_vendor%g
+ s%@host_os@%$host_os%g
+ s%@target@%$target%g
+ s%@target_alias@%$target_alias%g
+ s%@target_cpu@%$target_cpu%g
+ s%@target_vendor@%$target_vendor%g
+ s%@target_os@%$target_os%g
+ s%@build@%$build%g
+ s%@build_alias@%$build_alias%g
+ s%@build_cpu@%$build_cpu%g
+ s%@build_vendor@%$build_vendor%g
+ s%@build_os@%$build_os%g
+ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+ s%@INSTALL_DATA@%$INSTALL_DATA%g
+ /@host_makefile_frag@/r $host_makefile_frag
+ s%@host_makefile_frag@%%g
+ /@target_makefile_frag@/r $target_makefile_frag
+ s%@target_makefile_frag@%%g
+ s%@frags@%$frags%g
+
+ CEOF
+ EOF
+
+ cat >> $CONFIG_STATUS <<\EOF
+
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ ac_file=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=""
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+ EOF
+
+ cat >> $CONFIG_STATUS <<EOF
+
+ CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+ EOF
+ cat >> $CONFIG_STATUS <<\EOF
+ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+ # $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+ s%@configure_input@%$configure_input%g
+ s%@srcdir@%$srcdir%g
+ s%@top_srcdir@%$top_srcdir%g
+ s%@INSTALL@%$INSTALL%g
+ " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+ fi; done
+ rm -f conftest.s*
+
+ EOF
+
+ cat >> $CONFIG_STATUS <<EOF
+ ac_sources="$files"
+ ac_dests="$links"
+ EOF
+
+ cat >> $CONFIG_STATUS <<\EOF
+ srcdir=$ac_given_srcdir
+ while test -n "$ac_sources"; do
+ set $ac_dests; ac_dest=$1; shift; ac_dests=$*
+ set $ac_sources; ac_source=$1; shift; ac_sources=$*
+
+ echo "linking $srcdir/$ac_source to $ac_dest"
+
+ if test ! -r $srcdir/$ac_source; then
+ { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
+ fi
+ rm -f $ac_dest
+
+ # Make relative symlinks.
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
+ # The dest file is in a subdirectory.
+ test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
+ ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dest_dir_suffix.
+ ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dest_dir_suffix= ac_dots=
+ fi
+
+ case "$srcdir" in
+ [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
+ *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
+ esac
+
+ # Make a symlink if possible; otherwise try a hard link.
+ if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
+ ln $srcdir/$ac_source $ac_dest; then :
+ else
+ { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
+ fi
+ done
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
+
+ EOF
+ cat >> $CONFIG_STATUS <<\EOF
+
+ exit 0
+ EOF
+ chmod +x $CONFIG_STATUS
+ rm -fr confdefs* $ac_clean_files
+ test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
Index: gdb/gdb/gdbserver/configure.in
diff -c gdb/gdb/gdbserver/configure.in:1.1.1.1 gdb/gdb/gdbserver/configure.in:1.2
*** gdb/gdb/gdbserver/configure.in:1.1.1.1 Wed May 19 10:39:36 1999
--- gdb/gdb/gdbserver/configure.in Thu Feb 10 18:35:36 2000
***************
*** 1,46 ****
! srcname="Remote GDB server"
! srctrigger=server.c
! gdb_serial_driver=../ser-unix.c
! # per-host:
! . ${srcdir}/../configure.host
!
! echo "gdbserver/configure.in: host is $host, target is $target"
! if [ ! -f ${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh ]; then
! echo '***' "GDB remote does not support host ${host}" 1>&2
! exit 1
! fi
! # We really shouldn't depend on there being a space after XM_FILE= ...
! hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh`
!
! # per-target:
. ${srcdir}/../configure.tgt
! echo "gdbserver/configure.in: host_cpu is $host_cpu, target_cpu is $target_cpu"
!
! if [ ! -f ${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt ]; then
! echo '***' "GDB remote does not support target ${target}" 1>&2
! exit 1
! fi
!
! if [ -z "${removing}" ] ; then
! cat ${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh ${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt | awk '$1 == "#msg" {
! print substr($0,6)}'
fi
!
! # We really shouldn't depend on there being a space after TM_FILE= ...
! targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt`
!
! if [ "${target}" = "${host}" ] ; then
! nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh`
! fi
!
! host_makefile_frag=../config/${gdb_host_cpu}/${gdb_host}.mh
! target_makefile_frag=../config/${gdb_target_cpu}/${gdb_target}.mt
# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
# (NAT_FILE) is not set in the ?config/* file, we don't make the
--- 1,65 ----
! dnl Autoconf configure script for GDB server.
! dnl Copyright 2000 Free Software Foundation, Inc.
! dnl
! dnl This file is part of GDB.
! dnl
! dnl This program is free software; you can redistribute it and/or modify
! dnl it under the terms of the GNU General Public License as published by
! dnl the Free Software Foundation; either version 2 of the License, or
! dnl (at your option) any later version.
! dnl
! dnl This program is distributed in the hope that it will be useful,
! dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
! dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! dnl GNU General Public License for more details.
! dnl
! dnl You should have received a copy of the GNU General Public License
! dnl along with this program; if not, write to the Free Software
! dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
! dnl Process this file with autoconf to produce a configure script.
! AC_INIT(server.c)
! AC_CANONICAL_SYSTEM
! AC_PROG_INSTALL
! . ${srcdir}/../configure.host
. ${srcdir}/../configure.tgt
! frags=
! host_makefile_frag=${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh
! if test ! -f ${host_makefile_frag}; then
! AC_MSG_ERROR("*** GDB remote does not support host ${host}")
! fi
! frags="$frags $host_makefile_frag"
!
! target_makefile_frag=${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt
! if test ! -f ${target_makefile_frag}; then
! AC_MSG_ERROR("*** GDB remote does not support target ${target}")
! fi
! frags="$frags $target_makefile_frag"
!
! AC_SUBST_FILE(host_makefile_frag)
! AC_SUBST_FILE(target_makefile_frag)
! AC_SUBST(frags)
!
! changequote(,)dnl
! hostfile=`sed -n '
! s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
! ' ${host_makefile_frag}`
!
! targetfile=`sed -n '
! s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
! ' ${target_makefile_frag}`
!
! if test "${target}" = "${host}"; then
! nativefile=`sed -n '
! s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
! ' ${host_makefile_frag}`
fi
! changequote([,])dnl
# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
# (NAT_FILE) is not set in the ?config/* file, we don't make the
***************
*** 52,84 ****
links=
rm -f xm.h
rm -f ser-hardwire.c
! if [ "${hostfile}" != "" ]; then
! if [ -f ${srcdir}/../config/${hostfile} ]; then
! files="${files} ../config/${hostfile}"
! else
! files="${files} ../config/${gdb_host_cpu}/${hostfile}"
! fi
links="${links} xm.h"
-
- # files="${files} ${gdb_serial_driver}"
- # links="${links} ser-hardwire.c"
fi
rm -f tm.h
! if [ "${targetfile}" != "" ]; then
! if [ -f ${srcdir}/../config/${targetfile} ]; then
! files="${files} ../config/${targetfile}"
! else
! files="${files} ../config/${gdb_target_cpu}/${targetfile}"
! fi
links="${links} tm.h"
fi
rm -f nm.h
! if [ "${nativefile}" != "" ]; then
! if [ -f ${srcdir}/../config/${nativefile} ]; then
! files="${files} ../config/${nativefile}"
! else
! files="${files} ../config/${gdb_host_cpu}/${nativefile}"
! fi
links="${links} nm.h"
# temporary scaffolding until all hosts have the host/target/native
# split in place.
--- 71,88 ----
links=
rm -f xm.h
rm -f ser-hardwire.c
! if test "${hostfile}" != ""; then
! files="${files} ../config/${gdb_host_cpu}/${hostfile}"
links="${links} xm.h"
fi
rm -f tm.h
! if test "${targetfile}" != ""; then
! files="${files} ../config/${gdb_target_cpu}/${targetfile}"
links="${links} tm.h"
fi
rm -f nm.h
! if test "${nativefile}" != ""; then
! files="${files} ../config/${gdb_host_cpu}/${nativefile}"
links="${links} nm.h"
# temporary scaffolding until all hosts have the host/target/native
# split in place.
***************
*** 86,100 ****
files="${files} ../config/nm-empty.h"
links="${links} nm.h"
fi
! if [ ${target_cpu} = "sparclite" ]; then
! configdirs="${configdirs} sparclite"
! fi
!
! # post-target:
!
! if [ "${nativefile}" = "" ] ; then
! sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
! < Makefile > Makefile.tem
! mv -f Makefile.tem Makefile
! fi
--- 90,95 ----
files="${files} ../config/nm-empty.h"
links="${links} nm.h"
fi
+ AC_LINK_FILES($files, $links)
! AC_OUTPUT(Makefile)
Index: gdb/gdb/gdbserver/low-nbsd.c
diff -c /dev/null gdb/gdb/gdbserver/low-nbsd.c:1.2
*** /dev/null Thu Feb 10 18:35:36 2000
--- gdb/gdb/gdbserver/low-nbsd.c Thu Feb 10 18:35:36 2000
***************
*** 0 ****
--- 1,320 ----
+ /* Low level interface to ptrace, for the remote server for GDB.
+ Copyright (C) 1986, 1987, 1993, 2000 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+ #include "defs.h"
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include "frame.h"
+ #include "inferior.h"
+
+ #include <stdio.h>
+ #include <errno.h>
+
+ /***************Begin MY defs*********************/
+ int quit_flag = 0;
+ static char my_registers[REGISTER_BYTES];
+ char *registers = my_registers;
+
+ /* Index within `registers' of the first byte of the space for
+ register N. */
+
+ char buf2[MAX_REGISTER_RAW_SIZE];
+ /***************End MY defs*********************/
+
+ #include <sys/ptrace.h>
+ #include <machine/reg.h>
+
+ extern int sys_nerr;
+ // extern char **sys_errlist;
+ extern char **environ;
+ extern int inferior_pid;
+ void quit (), perror_with_name ();
+
+ #ifdef TM_I386_H
+ /* i386_register_raw_size[i] is the number of bytes of storage in the
+ actual machine representation for register i. */
+ int i386_register_raw_size[MAX_NUM_REGS] = {
+ 4, 4, 4, 4,
+ 4, 4, 4, 4,
+ 4, 4, 4, 4,
+ 4, 4, 4, 4,
+ 10, 10, 10, 10,
+ 10, 10, 10, 10,
+ 4, 4, 4, 4,
+ 4, 4, 4, 4,
+ 16, 16, 16, 16,
+ 16, 16, 16, 16,
+ 4
+ };
+
+ int i386_register_byte[MAX_NUM_REGS];
+
+ static void
+ initialize_arch()
+ {
+ /* Initialize the table saying where each register starts in the
+ register file. */
+ {
+ int i, offset;
+
+ offset = 0;
+ for (i = 0; i < MAX_NUM_REGS; i++)
+ {
+ i386_register_byte[i] = offset;
+ offset += i386_register_raw_size[i];
+ }
+ }
+ }
+
+ #endif
+
+
+ /* Start an inferior process and returns its pid.
+ ALLARGS is a vector of program-name and args.
+ ENV is the environment vector to pass. */
+
+ int
+ create_inferior (program, allargs)
+ char *program;
+ char **allargs;
+ {
+ int pid;
+
+ pid = fork ();
+ if (pid < 0)
+ perror_with_name ("fork");
+
+ if (pid == 0)
+ {
+ ptrace (PT_TRACE_ME, 0, 0, 0);
+
+ execv (program, allargs);
+
+ fprintf (stderr, "Cannot exec %s: %s.\n", program,
+ errno < sys_nerr ? sys_errlist[errno] : "unknown error");
+ fflush (stderr);
+ _exit (0177);
+ }
+
+ return pid;
+ }
+
+ /* Kill the inferior process. Make us have no inferior. */
+
+ void
+ kill_inferior ()
+ {
+ if (inferior_pid == 0)
+ return;
+ ptrace (PT_KILL, inferior_pid, 0, 0);
+ wait (0);
+ /*************inferior_died ();****VK**************/
+ }
+
+ /* Return nonzero if the given thread is still alive. */
+ int
+ mythread_alive (pid)
+ int pid;
+ {
+ return 1;
+ }
+
+ /* Wait for process, returns status */
+
+ unsigned char
+ mywait (status)
+ char *status;
+ {
+ int pid;
+ int w;
+
+ pid = wait (&w);
+ if (pid != inferior_pid)
+ perror_with_name ("wait");
+
+ if (WIFEXITED (w))
+ {
+ fprintf (stderr, "\nChild exited with retcode = %x \n", WEXITSTATUS (w));
+ *status = 'W';
+ return ((unsigned char) WEXITSTATUS (w));
+ }
+ else if (!WIFSTOPPED (w))
+ {
+ fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
+ *status = 'X';
+ return ((unsigned char) WTERMSIG (w));
+ }
+
+ fetch_inferior_registers (0);
+
+ *status = 'T';
+ return ((unsigned char) WSTOPSIG (w));
+ }
+
+ /* Resume execution of the inferior process.
+ If STEP is nonzero, single-step it.
+ If SIGNAL is nonzero, give it that signal. */
+
+ void
+ myresume (step, signal)
+ int step;
+ int signal;
+ {
+ errno = 0;
+ ptrace (step ? PT_STEP : PT_CONTINUE, inferior_pid,
+ (PTRACE_ARG3_TYPE) 1, signal);
+ if (errno)
+ perror_with_name ("ptrace");
+ }
+
+ /* Fetch one or more registers from the inferior. REGNO == -1 to get
+ them all. We actually fetch more than requested, when convenient,
+ marking them as valid so we won't fetch them again. */
+
+ void
+ fetch_inferior_registers (ignored)
+ int ignored;
+ {
+ struct reg inferior_registers;
+ struct fpreg inferior_fp_registers;
+
+ ptrace (PT_GETREGS, inferior_pid,
+ (PTRACE_ARG3_TYPE) &inferior_registers, 0);
+ memcpy (®isters[REGISTER_BYTE(0)], &inferior_registers,
+ sizeof(inferior_registers));
+
+ #if 0 /* def FP0_REGNUM */
+ ptrace (PT_GETFPREGS, inferior_pid,
+ (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
+ memcpy (®isters[REGISTER_BYTE(FP0_REGNUM)], &inferior_fp_registers,
+ sizeof(inferior_fp_registers));
+ #endif
+ }
+
+ /* Store our register values back into the inferior.
+ If REGNO is -1, do this for all registers.
+ Otherwise, REGNO specifies which register (so we can save time). */
+
+ void
+ store_inferior_registers (ignored)
+ int ignored;
+ {
+ struct reg inferior_registers;
+ struct fpreg inferior_fp_registers;
+
+ memcpy (&inferior_registers, ®isters[REGISTER_BYTE(0)],
+ sizeof(inferior_registers));
+ ptrace (PT_SETREGS, inferior_pid,
+ (PTRACE_ARG3_TYPE) &inferior_registers, 0);
+
+ #if 0 /* def FP0_REGNUM */
+ memcpy (&inferior_fp_registers, ®isters[REGISTER_BYTE (FP0_REGNUM)],
+ sizeof (inferior_fp_registers));
+ ptrace (PT_SETFPREGS, inferior_pid,
+ (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
+ #endif
+ }
+
+ /* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory
+ in the NEW_SUN_PTRACE case.
+ It ought to be straightforward. But it appears that writing did
+ not write the data that I specified. I cannot understand where
+ it got the data that it actually did write. */
+
+ /* Copy LEN bytes from inferior's memory starting at MEMADDR
+ to debugger memory starting at MYADDR. */
+
+ read_inferior_memory (memaddr, myaddr, len)
+ CORE_ADDR memaddr;
+ char *myaddr;
+ int len;
+ {
+ register int i;
+ /* Round starting address down to longword boundary. */
+ register CORE_ADDR addr = memaddr & -sizeof (int);
+ /* Round ending address up; get number of longwords that makes. */
+ register int count
+ = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
+ /* Allocate buffer of that many longwords. */
+ register int *buffer = (int *) alloca (count * sizeof (int));
+
+ /* Read all the longwords */
+ for (i = 0; i < count; i++, addr += sizeof (int))
+ {
+ buffer[i] = ptrace (PT_READ_D, inferior_pid, (PTRACE_ARG3_TYPE) addr, 0);
+ }
+
+ /* Copy appropriate bytes out of the buffer. */
+ memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
+ }
+
+ /* Copy LEN bytes of data from debugger memory at MYADDR
+ to inferior's memory at MEMADDR.
+ On failure (cannot write the inferior)
+ returns the value of errno. */
+
+ int
+ write_inferior_memory (memaddr, myaddr, len)
+ CORE_ADDR memaddr;
+ char *myaddr;
+ int len;
+ {
+ register int i;
+ /* Round starting address down to longword boundary. */
+ register CORE_ADDR addr = memaddr & -sizeof (int);
+ /* Round ending address up; get number of longwords that makes. */
+ register int count
+ = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
+ /* Allocate buffer of that many longwords. */
+ register int *buffer = (int *) alloca (count * sizeof (int));
+ extern int errno;
+
+ /* Fill start and end extra bytes of buffer with existing memory data. */
+
+ buffer[0] = ptrace (PT_READ_D, inferior_pid, (PTRACE_ARG3_TYPE) addr, 0);
+
+ if (count > 1)
+ {
+ buffer[count - 1]
+ = ptrace (PT_READ_D, inferior_pid,
+ (PTRACE_ARG3_TYPE) addr + (count - 1) * sizeof (int), 0);
+ }
+
+ /* Copy data to be written over corresponding part of buffer */
+
+ memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
+
+ /* Write the entire buffer. */
+
+ for (i = 0; i < count; i++, addr += sizeof (int))
+ {
+ errno = 0;
+ ptrace (PT_WRITE_D, inferior_pid, (PTRACE_ARG3_TYPE) addr, buffer[i]);
+ if (errno)
+ return errno;
+ }
+
+ return 0;
+ }
+ \f
+ void
+ initialize_low ()
+ {
+ initialize_arch ();
+ }
--
J.T. Conklin
RedBack Networks
From akale@veritas.com Sat Apr 01 00:00:00 2000
From: "Amit S. Kale" <akale@veritas.com>
To: Todd Whitesel <toddpw@windriver.com>, kingdon@redhat.com (Jim Kingdon)
Cc: akale@veritas.com, kettenis@wins.uva.nl, gdb@sourceware.cygnus.com, gdb-patches@sourceware.cygnus.com
Subject: Re: Regression caused by elfread.c patch
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <00021514224700.31608@fermat.vxindia.veritas.com>
References: <200002150800.AAA07477@alabama.wrs.com>
X-SW-Source: 2000-q1/msg00154.html
Content-length: 2745
Hi,
On Tue, 15 Feb 2000, Jim Kingdon wrote:
> > That was because Jim didn't checkin my patch correctly.
> > He has fixed it now.
>
> No, this is a different problem.
Apolgies to Jim, because the problem was not his fault as said by me.
> I don't see how your patch could work at all - sym->section->index is
> a very different number than a SECT_OFF_* code. The SECT_OFF_* code
> (which gets fed to ANOFFSET) isn't computed until later in the
> function (via the call to record_minimal_symbol_and_info).
The patch I sent is working in some configurations. I have been using it for
debugging linux kernel. This patch was needed to load module object files using
'add-symbol-file' after loading kernel object file using 'symbol-file'.
I guess gdb first prepares text, data, bss segments and following code
bfd/section.c:bfd_make_section_anyway():
newsect->index = abfd->section_count++;
indicates that section->index contains SECT_OFF_* codes when segments are
loaded. This may not have been designed this way, but it seems to be that way.
Using sym->section->index is not right for segments that are not text or data
segments. Using sym->section->index should be all right for data segments.
I suggest following patch. I have verified that the vfprintf problem reported
by Mark does not appear with this patch. I haven't tested it with test suite.
--- elfread.c Tue Feb 15 13:54:52 2000
+++ ../../../utils/src/gdb/elfread.c Tue Feb 15 10:56:30 2000
@@ -293,14 +293,11 @@ elf_symtab_read (objfile, dynamic)
if (number_of_symbols < 0)
error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd),
bfd_errmsg (bfd_get_error ()));
+ /* FIXME: Should use section specific offset, not SECT_OFF_TEXT. */
+ offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
for (i = 0; i < number_of_symbols; i++)
{
sym = symbol_table[i];
- if (sym->section->flags & SEC_DATA) {
- offset = ANOFFSET (objfile->section_offsets, sym->section->index);
- } else {
- offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
- }
if (sym->name == NULL || *sym->name == '\0')
{
/* Skip names that don't exist (shouldn't happen), or names
On Tue, 15 Feb 2000, Todd Whitesel wrote:
> [snip]
> However, so few configurations (read: vxWorks and ??) actually use different
> offsets for, say, SECT_OFF_TEXT and SECT_OFF_DATA, that no one notices the
> problems with it. (We read relocatable .o files too, which is also rare.)
It won'd be rare when gdb will be used by more people to debug linux kernel
modules.
> [snip]
--
Amit Kale
Veritas Software ( http://www.veritas.com )
From ac131313@cygnus.com Sat Apr 01 00:00:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: RDBrown@mira.net, RodneyBrown@pmsc.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: Attempt at ATTRIBUTE_UNUSED patch
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <38C0AEF6.139716C6@cygnus.com>
References: <200002292125.IAA00707@ppp88.dyn138.pacific.net.au>
X-SW-Source: 2000-q1/msg00501.html
Content-length: 316
Rodney Brown wrote:
>
> The enclosed scripts use the warnings from the gdb build with gcc and the
> standard format of gdb source to add appropriate ATTRIBUTE_UNUSED
> decorations. (Workaround for lack of Copyright assignment)
>
> In gdb/gdb
FYI,
I've put this into my ``once 5.0 branch is cut'' queue.
Andrew
From tm@netcom.com Sat Apr 01 00:00:00 2000
From: Toshiyasu Morita <tm@netcom.com>
To: msnyder@cygnus.com (Michael Snyder)
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH]: Allow struct compare in expressions.
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <200003222218.OAA02705@netcom.com>
References: <200003222043.MAA10512@cleaver.cygnus.com>
X-SW-Source: 2000-q1/msg00921.html
Content-length: 4958
Does this compare ignore the padding in the struct?
>
>
> The following change allows GDB to evaluate (and set watchpoints on)
> expressions of the form (a == b) and (a != b), where a and b are
> simple C structs or unions. It would be possible to extend this
> further by allowing simple binary comparison for classes that don't
> have an operator== method: I leave that as an exercise for someone
> else.
>
> Jim Blandy, David Taylor, I think both of your approvals is required.
>
> 2000-03-22 Michael Snyder <msnyder@cleaver.cygnus.com>
>
> * eval.c (evaluate_subexp_standard): allow for simple comparison
> of structures, in the absense of C++ method symbols.
> * symtab.c (total_number_of_methods): make public, for use above.
> * symtab.h (total_number_of_methods): publish prototype.
>
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/src/src/gdb/ChangeLog,v
> retrieving revision 1.163
> diff -c -r1.163 ChangeLog
> *** ChangeLog 2000/03/22 09:45:01 1.163
> --- ChangeLog 2000/03/22 20:38:33
> ***************
> *** 1,3 ****
> --- 1,10 ----
> + 2000-03-22 Michael Snyder <msnyder@cleaver.cygnus.com>
> +
> + * eval.c (evaluate_subexp_standard): allow for simple comparison
> + of structures, in the absense of C++ method symbols.
> + * symtab.c (total_number_of_methods): make public, for use above.
> + * symtab.h (total_number_of_methods): publish prototype.
> +
> 2000-03-22 Mark Kettenis <kettenis@gnu.org>
>
> * config/i386/tm-i386aix.h (I386_AIX_TARGET): Remove.
> Index: eval.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/eval.c,v
> retrieving revision 1.2
> diff -c -r1.2 eval.c
> *** eval.c 2000/03/14 17:01:04 1.2
> --- eval.c 2000/03/22 20:38:34
> ***************
> *** 1448,1454 ****
> arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
> if (noside == EVAL_SKIP)
> goto nosideret;
> ! if (binop_user_defined_p (op, arg1, arg2))
> {
> return value_x_binop (arg1, arg2, op, OP_NULL, noside);
> }
> --- 1448,1459 ----
> arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
> if (noside == EVAL_SKIP)
> goto nosideret;
> !
> ! /* NOTE: because BINOP_EQUAL is a legal operaton for
> ! C structs (as opposed to C++ classes), revert to
> ! simple value comparison if the type has no methods. */
> ! if (binop_user_defined_p (op, arg1, arg2) &&
> ! total_number_of_methods (arg1->type) > 0)
> {
> return value_x_binop (arg1, arg2, op, OP_NULL, noside);
> }
> ***************
> *** 1463,1469 ****
> arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
> if (noside == EVAL_SKIP)
> goto nosideret;
> ! if (binop_user_defined_p (op, arg1, arg2))
> {
> return value_x_binop (arg1, arg2, op, OP_NULL, noside);
> }
> --- 1468,1479 ----
> arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
> if (noside == EVAL_SKIP)
> goto nosideret;
> !
> ! /* NOTE: because BINOP_NOTEQUAL is a legal operaton for
> ! C structs (as opposed to C++ classes), revert to
> ! simple value comparison if the type has no methods. */
> ! if (binop_user_defined_p (op, arg1, arg2) &&
> ! total_number_of_methods (arg1->type) > 0)
> {
> return value_x_binop (arg1, arg2, op, OP_NULL, noside);
> }
> Index: symtab.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/symtab.c,v
> retrieving revision 1.2
> diff -c -r1.2 symtab.c
> *** symtab.c 2000/02/08 04:39:02 1.2
> --- symtab.c 2000/03/22 20:38:34
> ***************
> *** 2217,2225 ****
> reader because the type of the baseclass might still be stubbed
> when the definition of the derived class is parsed. */
>
> ! static int total_number_of_methods PARAMS ((struct type * type));
> !
> ! static int
> total_number_of_methods (type)
> struct type *type;
> {
> --- 2217,2223 ----
> reader because the type of the baseclass might still be stubbed
> when the definition of the derived class is parsed. */
>
> ! int
> total_number_of_methods (type)
> struct type *type;
> {
> Index: symtab.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/symtab.h,v
> retrieving revision 1.4
> diff -c -r1.4 symtab.h
> *** symtab.h 2000/03/21 22:37:42 1.4
> --- symtab.h 2000/03/22 20:38:34
> ***************
> *** 1462,1467 ****
> --- 1462,1472 ----
> extern int
> in_prologue PARAMS ((CORE_ADDR pc, CORE_ADDR func_start));
>
> + /* Number of method symbols for TYPE
> + (and all its base classes) */
> + extern int
> + total_number_of_methods PARAMS ((struct type * type));
> +
> extern struct symbol *
> fixup_symbol_section PARAMS ((struct symbol *, struct objfile *));
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-04-01 0:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-18 14:14 thumb_skip_prologue too adventurous Jonathan Larmour
[not found] ` <38D40052.AF731E81@redhat.co.uk>
[not found] ` <38D5064B.40AE9470@redhat.com>
2000-03-19 12:29 ` Jonathan Larmour
2000-03-24 12:46 ` Jonathan Larmour
2000-04-01 0:00 ` Jonathan Larmour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox