* A new revised patch for dlclose
[not found] <20000307120800.A27315@valinux.com>
@ 2000-04-01 0:00 ` H . J . Lu
2000-04-01 0:00 ` Andrew Cagney
2000-04-01 0:00 ` A " Mark Kettenis
1 sibling, 1 reply; 4+ messages in thread
From: H . J . Lu @ 2000-04-01 0:00 UTC (permalink / raw)
To: gdb-patches; +Cc: GDB
On Tue, Mar 07, 2000 at 12:08:00PM -0800, H . J . Lu wrote:
> Here is a revised patch for dlclose. If you take a look at the
> dynamic linker in glibc 2.1 or above, you will find that it informs
> gdb about loading/unloading a shared library via an internal debug
> function, _dl_debug_state (). gdb already handles the loading in
> handle_inferior_event () with BPSTAT_WHAT_CHECK_SHLIBS and
> BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK. However, we need also
> check the unloading event. solib_verify () will be called only when the
> dynamic linker calls _dl_debug_state (). It shouldn't introduce any
> overhead. I believe it is on the right track although it may be further
> optimized.
>
This patch overwrites
http://sourceware.cygnus.com/ml/gdb-patches/2000-q1/msg00551.html
I optimized it a little bit. We don't need to do the check if the
shared library is still being loaded/unloaded.
H.J.
---
2000-03-07 H.J. Lu <hjl@gnu.org>
Based on patches from Sam Lantinga (slouken@devolution.com):
* solib.c (solib_verify): New function. Reload list of shared
objects when they are added or deleted and dump symbols from
unloaded shared objects.
* solib.h (SOLIB_VERIFY): New. Defined as solib_verify.
* infrun.c (handle_inferior_event): Also call SOLIB_VERIFY ()
if it is defined when we hit the internal debug breakpoint for
shared libraries in the dynamic linker.
Index: solib.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/solib.c,v
retrieving revision 1.1.1.4
diff -u -p -r1.1.1.4 solib.c
--- solib.c 2000/03/07 18:42:17 1.1.1.4
+++ solib.c 2000/03/07 20:12:50
@@ -950,6 +954,73 @@ open_symbol_file_object (arg)
return 1;
}
#endif /* SVR4_SHARED_LIBS */
+
+/*
+
+GLOBAL FUNCTION
+
+ solib_verify -- check solib list consistency and dump symbols
+ from unloaded shared objects
+
+SYNOPSIS
+
+ void solib_verify (void)
+
+DESCRIPTION
+
+ This module is called whenever we hit a dynamic linker
+ breakpoint and allows us to check the consistency of our shared
+ object list and unload objects which are no longer valid in the
+ in the inferior. Without this, dynamic unlinking of objects
+ could crash us. This function should only be called when we
+ hit the internal debug breakpoint for shared libraries in the
+ dynamic linker.
+
+AUTHOR
+ Sam Lantinga <hercules@lokigames.com>
+ */
+
+void
+solib_verify (void)
+{
+#ifdef SVR4_SHARED_LIBS
+ if (debug_base)
+ {
+ read_memory (debug_base, (char *) &debug_copy,
+ sizeof (struct r_debug));
+ /* If the shared object state is consistent, we can reload our
+ list */
+ if (debug_copy.r_state == RT_CONSISTENT)
+ {
+ struct objfile *current;
+
+ clear_solib();
+
+ for (current = symfile_objfile; current;
+ current = current->next)
+ {
+ struct so_list *so;
+ char *bfd_filename;
+ for (so = so_list_head; so; so = so->next)
+ {
+ if (so->abfd)
+ {
+ bfd_filename = bfd_get_filename (so->abfd);
+ if (bfd_filename
+ && strcmp(bfd_filename, current->name) == 0)
+ break;
+ }
+ }
+ if ((current != symfile_objfile) && (so == NULL))
+ {
+ free_objfile(current);
+ break;
+ }
+ }
+ }
+ }
+#endif /* SVR4_SHARED_LIBS */
+}
/*
Index: solib.h
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/solib.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 solib.h
--- solib.h 1999/09/09 00:38:38 1.1.1.1
+++ solib.h 2000/03/07 19:49:31
@@ -37,6 +37,14 @@ clear_solib PARAMS ((void));
extern void
solib_add PARAMS ((char *, int, struct target_ops *));
+/* Called to check solib list consistency and dump symbols from
+ unloaded shared objects. */
+
+#define SOLIB_VERIFY() solib_verify ()
+
+extern void
+solib_verify PARAMS ((void));
+
/* Function to be called when the inferior starts up, to discover the names
of shared libraries that are dynamically linked, the base addresses to
which they are linked, and sufficient information to read in their symbols
Index: infrun.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/infrun.c,v
retrieving revision 1.1.1.6
diff -u -p -r1.1.1.6 infrun.c
--- infrun.c 2000/03/07 18:42:13 1.1.1.6
+++ infrun.c 2000/03/07 19:53:59
@@ -2416,6 +2416,9 @@ handle_inferior_event (struct execution_
/* Switch terminal for any messages produced by
breakpoint_re_set. */
target_terminal_ours_for_output ();
+#ifdef SOLIB_VERIFY
+ SOLIB_VERIFY ();
+#endif
SOLIB_ADD (NULL, 0, NULL);
target_terminal_inferior ();
}
From kingdon@redhat.com Sat Apr 01 00:00:00 2000
From: Jim Kingdon <kingdon@redhat.com>
To: Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE
Cc: kevinb@cygnus.com, Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE, gdb-patches@sourceware.cygnus.com
Subject: Re: RFA: solib.c: Clean fix to get rid of severe Solaris 2.7 sparc regressions
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <200003092322.SAA01952@devserv.devel.redhat.com>
References: <200003090940.KAA32291@reisser.regent.e-technik.tu-muenchen.de>
X-SW-Source: 2000-q1/msg00637.html
Content-length: 124
> Good idea, thanks. Here is a revised patch which gets rid of all
> CORE_ADDR pointer casts in solib.c.
Looks good to me.
From shebs@shebs.cnchost.com Sat Apr 01 00:00:00 2000
From: Stan Shebs <shebs@shebs.cnchost.com>
To: gdb-patches@sourceware.cygnus.com
Cc: 3diff@gnu.org
Subject: GDB manual changes
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <38E0E672.478B088F@shebs.cnchost.com>
X-SW-Source: 2000-q1/msg01087.html
Content-length: 136933
I've just committed a pile of changes to the manual. This includes
the duplication of the top-level menu for the benefit of @ifhtml,
the re-removal of node links, and various formatting changes to
make @smallbook come out right (as requested by Brian Youmans).
I tested on 3.12, 3.12h (RH 6.1 version), and 4.0. Apparently
texi2html has a problem with the top-level menu that is under
@ifhtml, and it gets garbled, although 4.0 makeinfo -html works
fine (but it can only make one monster html file, sigh). It's
functionally no worse than before, but looks bad.
I'm still planning to rewrite the introduction to use a more
meaningful example program, and we still have undocumented
commands that ought to be mentioned, so this isn't the end,
but this should be a good base for the next round of tweaks.
(I left the remote protocol section mostly untouched, since JT
has a patch to apply.)
Stan
2000-03-28 Stan Shebs <shebs@apple.com>
* gdb.texinfo: Update dates, bump to Eighth Edition (note
expectation of additional changes before release), update
ISBN, add copy of top-level menu for @ifhtml, remove explicit
node links, rephrase and/or shorten lines to fix formatting
problem in both regular and @smallbook formats.
* annotate.texi: Shorten lines in example, use smallexample
consistently everywhere.
* Makefile.in: Add comment about texinfo 4.0 html generation.
(SFILES_INCLUDED): Add annotate.texi.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/doc/Makefile.in,v
retrieving revision 1.3
diff -p -r1.3 Makefile.in
*** Makefile.in 2000/03/24 07:27:24 1.3
--- Makefile.in 2000/03/28 16:33:45
*************** TEXIDIR=${gdbdir}/../texinfo
*** 40,45 ****
--- 40,49 ----
# where to find makeinfo, preferably one designed for texinfo-2
MAKEINFO=makeinfo
+ # Note that texinfo 4.0's makeinfo --html can only generate a
+ # single file, which would be too large, so continue to use
+ # texi2html. -sts 2000-03-28
+
MAKEHTML = texi2html
MAKEHTMLFLAGS = -glossary -menu -split_chapter
*************** TEXINDEX = texindex
*** 83,89 ****
DVIPS = dvips
# Main GDB manual's source files
! SFILES_INCLUDED = gdb-cfg.texi
SFILES_LOCAL = $(srcdir)/gdb.texinfo GDBvn.texi $(SFILES_INCLUDED)
--- 87,93 ----
DVIPS = dvips
# Main GDB manual's source files
! SFILES_INCLUDED = gdb-cfg.texi $(srcdir)/annotate.texi
SFILES_LOCAL = $(srcdir)/gdb.texinfo GDBvn.texi $(SFILES_INCLUDED)
Index: annotate.texi
===================================================================
RCS file: /cvs/src/src/gdb/doc/annotate.texi,v
retrieving revision 1.3
diff -p -r1.3 annotate.texi
*** annotate.texi 2000/03/24 07:30:06 1.3
--- annotate.texi 2000/03/28 16:33:45
***************
*** 60,68 ****
@chapter @value{GDBN} Annotations
@end ifclear
! This chapter describes annotations in @value{GDBN}, the GNU symbolic debugger.
! Annotations are designed to interface @value{GDBN} to graphical user interfaces
! or other similar programs which want to interact with @value{GDBN} at a
relatively high level.
@ignore
--- 60,68 ----
@chapter @value{GDBN} Annotations
@end ifclear
! This chapter describes annotations in @value{GDBN}. Annotations are
! designed to interface @value{GDBN} to graphical user interfaces or other
! similar programs which want to interact with @value{GDBN} at a
relatively high level.
@ignore
*************** additional information, and a newline.
*** 100,109 ****
cannot contain newline characters.
Any output not beginning with a newline and two @samp{control-z}
! characters denotes literal output from @value{GDBN}. Currently there is no need
! for @value{GDBN} to output a newline followed by two @samp{control-z} characters,
! but if there was such a need, the annotations could be extended with an
! @samp{escape} annotation which means those three characters as output.
A simple example of starting up @value{GDBN} with annotations is:
--- 100,110 ----
cannot contain newline characters.
Any output not beginning with a newline and two @samp{control-z}
! characters denotes literal output from @value{GDBN}. Currently there is
! no need for @value{GDBN} to output a newline followed by two
! @samp{control-z} characters, but if there was such a need, the
! annotations could be extended with an @samp{escape} annotation which
! means those three characters as output.
A simple example of starting up @value{GDBN} with annotations is:
*************** A simple example of starting up @value{G
*** 111,120 ****
$ gdb --annotate=2
GNU GDB 5.0
Copyright 2000 Free Software Foundation, Inc.
! GDB is free software, covered by the GNU General Public License, and you are
! welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
! There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sparc-sun-sunos4.1.3"
^Z^Zpre-prompt
--- 112,123 ----
$ gdb --annotate=2
GNU GDB 5.0
Copyright 2000 Free Software Foundation, Inc.
! GDB is free software, covered by the GNU General Public License,
! and you are welcome to change it and/or distribute copies of it
! under certain conditions.
Type "show copying" to see the conditions.
! There is absolutely no warranty for GDB. Type "show warranty"
! for details.
This GDB was configured as "sparc-sun-sunos4.1.3"
^Z^Zpre-prompt
*************** quit
*** 126,144 ****
$
@end smallexample
! Here @samp{quit} is input to @value{GDBN}; the rest is output from @value{GDBN}. The three
! lines beginning @samp{^Z^Z} (where @samp{^Z} denotes a @samp{control-z}
! character) are annotations; the rest is output from @value{GDBN}.
@node Server Prefix
@section The Server Prefix
@cindex server prefix for annotations
! To issue a command to @value{GDBN} without affecting certain aspects of the state
! which is seen by users, prefix it with @samp{server }. This means that
! this command will not affect the command history, nor will it affect
! @value{GDBN}'s notion of which command to repeat if @key{RET} is pressed on a
! line by itself.
The server prefix does not affect the recording of values into the value
history; to print a value without recording it into the value history,
--- 129,148 ----
$
@end smallexample
! Here @samp{quit} is input to @value{GDBN}; the rest is output from
! @value{GDBN}. The three lines beginning @samp{^Z^Z} (where @samp{^Z}
! denotes a @samp{control-z} character) are annotations; the rest is
! output from @value{GDBN}.
@node Server Prefix
@section The Server Prefix
@cindex server prefix for annotations
! To issue a command to @value{GDBN} without affecting certain aspects of
! the state which is seen by users, prefix it with @samp{server }. This
! means that this command will not affect the command history, nor will it
! affect @value{GDBN}'s notion of which command to repeat if @key{RET} is
! pressed on a line by itself.
The server prefix does not affect the recording of values into the value
history; to print a value without recording it into the value history,
*************** use the @code{output} command instead of
*** 148,155 ****
@section Values
@cindex annotations for values
! When a value is printed in various contexts, @value{GDBN} uses annotations to
! delimit the value from the surrounding text.
@findex value-history-begin
@findex value-history-value
--- 152,159 ----
@section Values
@cindex annotations for values
! When a value is printed in various contexts, @value{GDBN} uses
! annotations to delimit the value from the surrounding text.
@findex value-history-begin
@findex value-history-value
*************** delimit the value from the surrounding t
*** 157,169 ****
If a value is printed using @code{print} and added to the value history,
the annotation looks like
! @example
^Z^Zvalue-history-begin @var{history-number} @var{value-flags}
@var{history-string}
^Z^Zvalue-history-value
@var{the-value}
^Z^Zvalue-history-end
! @end example
where @var{history-number} is the number it is getting in the value
history, @var{history-string} is a string, such as @samp{$5 = }, which
--- 161,173 ----
If a value is printed using @code{print} and added to the value history,
the annotation looks like
! @smallexample
^Z^Zvalue-history-begin @var{history-number} @var{value-flags}
@var{history-string}
^Z^Zvalue-history-value
@var{the-value}
^Z^Zvalue-history-end
! @end smallexample
where @var{history-number} is the number it is getting in the value
history, @var{history-string} is a string, such as @samp{$5 = }, which
*************** a value which can be dereferenced and @s
*** 176,186 ****
If the value is not added to the value history (it is an invalid float
or it is printed with the @code{output} command), the annotation is similar:
! @example
^Z^Zvalue-begin @var{value-flags}
@var{the-value}
^Z^Zvalue-end
! @end example
@findex arg-begin
@findex arg-name-end
--- 180,190 ----
If the value is not added to the value history (it is an invalid float
or it is printed with the @code{output} command), the annotation is similar:
! @smallexample
^Z^Zvalue-begin @var{value-flags}
@var{the-value}
^Z^Zvalue-end
! @end smallexample
@findex arg-begin
@findex arg-name-end
*************** or it is printed with the @code{output}
*** 189,195 ****
When @value{GDBN} prints an argument to a function (for example, in the output
from the @code{backtrace} command), it annotates it as follows:
! @example
^Z^Zarg-begin
@var{argument-name}
^Z^Zarg-name-end
--- 193,199 ----
When @value{GDBN} prints an argument to a function (for example, in the output
from the @code{backtrace} command), it annotates it as follows:
! @smallexample
^Z^Zarg-begin
@var{argument-name}
^Z^Zarg-name-end
*************** from the @code{backtrace} command), it a
*** 197,203 ****
^Z^Zarg-value @var{value-flags}
@var{the-value}
^Z^Zarg-end
! @end example
where @var{argument-name} is the name of the argument,
@var{separator-string} is text which separates the name from the value
--- 201,207 ----
^Z^Zarg-value @var{value-flags}
@var{the-value}
^Z^Zarg-end
! @end smallexample
where @var{argument-name} is the name of the argument,
@var{separator-string} is text which separates the name from the value
*************** for the user's benefit (such as @samp{=}
*** 211,217 ****
@findex field-end
When printing a structure, @value{GDBN} annotates it as follows:
! @example
^Z^Zfield-begin @var{value-flags}
@var{field-name}
^Z^Zfield-name-end
--- 215,221 ----
@findex field-end
When printing a structure, @value{GDBN} annotates it as follows:
! @smallexample
^Z^Zfield-begin @var{value-flags}
@var{field-name}
^Z^Zfield-name-end
*************** When printing a structure, @value{GDBN}
*** 219,225 ****
^Z^Zfield-value
@var{the-value}
^Z^Zfield-end
! @end example
where @var{field-name} is the name of the field, @var{separator-string}
is text which separates the name from the value for the user's benefit
--- 223,229 ----
^Z^Zfield-value
@var{the-value}
^Z^Zfield-end
! @end smallexample
where @var{field-name} is the name of the field, @var{separator-string}
is text which separates the name from the value for the user's benefit
*************** same meanings as in a @code{value-histor
*** 228,236 ****
When printing an array, @value{GDBN} annotates it as follows:
! @example
^Z^Zarray-section-begin @var{array-index} @var{value-flags}
! @end example
where @var{array-index} is the index of the first element being
annotated and @var{value-flags} has the same meaning as in a
--- 232,240 ----
When printing an array, @value{GDBN} annotates it as follows:
! @smallexample
^Z^Zarray-section-begin @var{array-index} @var{value-flags}
! @end smallexample
where @var{array-index} is the index of the first element being
annotated and @var{value-flags} has the same meaning as in a
*************** annotated and @var{value-flags} has the
*** 238,260 ****
of elements, where is element can be either a single element:
@findex elt
! @example
@samp{,} @var{whitespace} ; @r{omitted for the first element}
@var{the-value}
^Z^Zelt
! @end example
or a repeated element
@findex elt-rep
@findex elt-rep-end
! @example
@samp{,} @var{whitespace} ; @r{omitted for the first element}
@var{the-value}
^Z^Zelt-rep @var{number-of-repititions}
@var{repetition-string}
^Z^Zelt-rep-end
! @end example
In both cases, @var{the-value} is the output for the value of the
element and @var{whitespace} can contain spaces, tabs, and newlines. In
--- 242,264 ----
of elements, where is element can be either a single element:
@findex elt
! @smallexample
@samp{,} @var{whitespace} ; @r{omitted for the first element}
@var{the-value}
^Z^Zelt
! @end smallexample
or a repeated element
@findex elt-rep
@findex elt-rep-end
! @smallexample
@samp{,} @var{whitespace} ; @r{omitted for the first element}
@var{the-value}
^Z^Zelt-rep @var{number-of-repititions}
@var{repetition-string}
^Z^Zelt-rep-end
! @end smallexample
In both cases, @var{the-value} is the output for the value of the
element and @var{whitespace} can contain spaces, tabs, and newlines. In
*************** user that repitition is being depicted.
*** 267,275 ****
Once all the array elements have been output, the array annotation is
ended with
! @example
^Z^Zarray-section-end
! @end example
@node Frame Annotations
@section Frames
--- 271,279 ----
Once all the array elements have been output, the array annotation is
ended with
! @smallexample
^Z^Zarray-section-end
! @end smallexample
@node Frame Annotations
@section Frames
*************** to frames printed when @value{GDBN} stop
*** 282,291 ****
@findex frame-begin
The frame annotation begins with
! @example
^Z^Zframe-begin @var{level} @var{address}
@var{level-string}
! @end example
where @var{level} is the number of the frame (0 is the innermost frame,
and other frames have positive numbers), @var{address} is the address of
--- 286,295 ----
@findex frame-begin
The frame annotation begins with
! @smallexample
^Z^Zframe-begin @var{level} @var{address}
@var{level-string}
! @end smallexample
where @var{level} is the number of the frame (0 is the innermost frame,
and other frames have positive numbers), @var{address} is the address of
*************** designed to convey the level to the user
*** 295,303 ****
does not depend on the language). The frame ends with
@findex frame-end
! @example
^Z^Zframe-end
! @end example
Between these annotations is the main body of the frame, which can
consist of
--- 299,307 ----
does not depend on the language). The frame ends with
@findex frame-end
! @smallexample
^Z^Zframe-end
! @end smallexample
Between these annotations is the main body of the frame, which can
consist of
*************** consist of
*** 305,314 ****
@itemize @bullet
@item
@findex function-call
! @example
^Z^Zfunction-call
@var{function-call-string}
! @end example
where @var{function-call-string} is text designed to convey to the user
that this frame is associated with a function call made by @value{GDBN} to a
--- 309,318 ----
@itemize @bullet
@item
@findex function-call
! @smallexample
^Z^Zfunction-call
@var{function-call-string}
! @end smallexample
where @var{function-call-string} is text designed to convey to the user
that this frame is associated with a function call made by @value{GDBN} to a
*************** function in the program being debugged.
*** 316,325 ****
@item
@findex signal-handler-caller
! @example
^Z^Zsignal-handler-caller
@var{signal-handler-caller-string}
! @end example
where @var{signal-handler-caller-string} is text designed to convey to
the user that this frame is associated with whatever mechanism is used
--- 320,329 ----
@item
@findex signal-handler-caller
! @smallexample
^Z^Zsignal-handler-caller
@var{signal-handler-caller-string}
! @end smallexample
where @var{signal-handler-caller-string} is text designed to convey to
the user that this frame is associated with whatever mechanism is used
*************** A normal frame.
*** 334,345 ****
This can optionally (depending on whether this is thought of as
interesting information for the user to see) begin with
! @example
^Z^Zframe-address
@var{address}
^Z^Zframe-address-end
@var{separator-string}
! @end example
where @var{address} is the address executing in the frame (the same
address as in the @code{frame-begin} annotation, but printed in a form
--- 338,349 ----
This can optionally (depending on whether this is thought of as
interesting information for the user to see) begin with
! @smallexample
^Z^Zframe-address
@var{address}
^Z^Zframe-address-end
@var{separator-string}
! @end smallexample
where @var{address} is the address executing in the frame (the same
address as in the @code{frame-begin} annotation, but printed in a form
*************** benefit.
*** 352,363 ****
@findex frame-args
Then comes
! @example
^Z^Zframe-function-name
@var{function-name}
^Z^Zframe-args
@var{arguments}
! @end example
where @var{function-name} is the name of the function executing in the
frame, or @samp{??} if not known, and @var{arguments} are the arguments
--- 356,367 ----
@findex frame-args
Then comes
! @smallexample
^Z^Zframe-function-name
@var{function-name}
^Z^Zframe-args
@var{arguments}
! @end smallexample
where @var{function-name} is the name of the function executing in the
frame, or @samp{??} if not known, and @var{arguments} are the arguments
*************** individually as well, @pxref{Value Annot
*** 371,377 ****
@findex frame-source-end
If source information is available, a reference to it is then printed:
! @example
^Z^Zframe-source-begin
@var{source-intro-string}
^Z^Zframe-source-file
--- 375,381 ----
@findex frame-source-end
If source information is available, a reference to it is then printed:
! @smallexample
^Z^Zframe-source-begin
@var{source-intro-string}
^Z^Zframe-source-file
*************** If source information is available, a re
*** 381,387 ****
^Z^Zframe-source-line
@var{line-number}
^Z^Zframe-source-end
! @end example
where @var{source-intro-string} separates for the user's benefit the
reference from the text which precedes it, @var{filename} is the name of
--- 385,391 ----
^Z^Zframe-source-line
@var{line-number}
^Z^Zframe-source-end
! @end smallexample
where @var{source-intro-string} separates for the user's benefit the
reference from the text which precedes it, @var{filename} is the name of
*************** If @value{GDBN} prints some information
*** 393,402 ****
library, which load segment, etc.; currently only done on the RS/6000),
it is annotated with
! @example
^Z^Zframe-where
@var{information}
! @end example
Then, if source is to actually be displayed for this frame (for example,
this is not true for output from the @code{backtrace} command), then a
--- 397,406 ----
library, which load segment, etc.; currently only done on the RS/6000),
it is annotated with
! @smallexample
^Z^Zframe-where
@var{information}
! @end smallexample
Then, if source is to actually be displayed for this frame (for example,
this is not true for output from the @code{backtrace} command), then a
*************** output, not in addition.
*** 419,425 ****
When @value{GDBN} is told to display something using the @code{display} command,
the results of the display are annotated:
! @example
^Z^Zdisplay-begin
@var{number}
^Z^Zdisplay-number-end
--- 423,429 ----
When @value{GDBN} is told to display something using the @code{display} command,
the results of the display are annotated:
! @smallexample
^Z^Zdisplay-begin
@var{number}
^Z^Zdisplay-number-end
*************** the results of the display are annotated
*** 433,439 ****
^Z^Zdisplay-value
@var{value}
^Z^Zdisplay-end
! @end example
where @var{number} is the number of the display, @var{number-separator}
is intended to separate the number from what follows for the user,
--- 437,443 ----
^Z^Zdisplay-value
@var{value}
^Z^Zdisplay-end
! @end smallexample
where @var{number} is the number of the display, @var{number-separator}
is intended to separate the number from what follows for the user,
*************** annotation which denotes the end of any
*** 459,469 ****
associated with the input. For example, the @code{prompt} input type
features the following annotations:
! @example
^Z^Zpre-prompt
^Z^Zprompt
^Z^Zpost-prompt
! @end example
The input types are
--- 463,473 ----
associated with the input. For example, the @code{prompt} input type
features the following annotations:
! @smallexample
^Z^Zpre-prompt
^Z^Zprompt
^Z^Zpost-prompt
! @end smallexample
The input types are
*************** presence of annotations.
*** 508,523 ****
@cindex annotations for errors, warnings and interrupts
@findex quit
! @example
^Z^Zquit
! @end example
This annotation occurs right before @value{GDBN} responds to an interrupt.
@findex error
! @example
^Z^Zerror
! @end example
This annotation occurs right before @value{GDBN} responds to an error.
--- 512,527 ----
@cindex annotations for errors, warnings and interrupts
@findex quit
! @smallexample
^Z^Zquit
! @end smallexample
This annotation occurs right before @value{GDBN} responds to an interrupt.
@findex error
! @smallexample
^Z^Zerror
! @end smallexample
This annotation occurs right before @value{GDBN} responds to an error.
*************** to the top level.
*** 532,540 ****
@findex error-begin
A quit or error annotation may be preceded by
! @example
^Z^Zerror-begin
! @end example
Any output between that and the quit or error annotation is the error
message.
--- 536,544 ----
@findex error-begin
A quit or error annotation may be preceded by
! @smallexample
^Z^Zerror-begin
! @end smallexample
Any output between that and the quit or error annotation is the error
message.
*************** The output from the @code{info breakpoin
*** 551,561 ****
@findex breakpoints-headers
@findex breakpoints-table
! @example
^Z^Zbreakpoints-headers
@var{header-entry}
^Z^Zbreakpoints-table
! @end example
where @var{header-entry} has the same syntax as an entry (see below) but
instead of containing data, it contains strings which are intended to
--- 555,565 ----
@findex breakpoints-headers
@findex breakpoints-table
! @smallexample
^Z^Zbreakpoints-headers
@var{header-entry}
^Z^Zbreakpoints-table
! @end smallexample
where @var{header-entry} has the same syntax as an entry (see below) but
instead of containing data, it contains strings which are intended to
*************** of:
*** 566,572 ****
@findex record
@findex field
! @example
^Z^Zrecord
^Z^Zfield 0
@var{number}
--- 570,576 ----
@findex record
@findex field
! @smallexample
^Z^Zrecord
^Z^Zfield 0
@var{number}
*************** of:
*** 588,594 ****
@var{ignore-count}
^Z^Zfield 9
@var{commands}
! @end example
Note that @var{address} is intended for user consumption---the syntax
varies depending on the language.
--- 592,598 ----
@var{ignore-count}
^Z^Zfield 9
@var{commands}
! @end smallexample
Note that @var{address} is intended for user consumption---the syntax
varies depending on the language.
*************** varies depending on the language.
*** 596,604 ****
The output ends with
@findex breakpoints-table-end
! @example
^Z^Zbreakpoints-table-end
! @end example
@node Invalidation
@section Invalidation Notices
--- 600,608 ----
The output ends with
@findex breakpoints-table-end
! @smallexample
^Z^Zbreakpoints-table-end
! @end smallexample
@node Invalidation
@section Invalidation Notices
*************** deleted a breakpoint.
*** 630,644 ****
When the program starts executing due to a @value{GDBN} command such as
@code{step} or @code{continue},
! @example
^Z^Zstarting
! @end example
is output. When the program stops,
! @example
^Z^Zstopped
! @end example
is output. Before the @code{stopped} annotation, a variety of
annotations describe how the program stopped.
--- 634,648 ----
When the program starts executing due to a @value{GDBN} command such as
@code{step} or @code{continue},
! @smallexample
^Z^Zstarting
! @end smallexample
is output. When the program stops,
! @smallexample
^Z^Zstopped
! @end smallexample
is output. Before the @code{stopped} annotation, a variety of
annotations describe how the program stopped.
*************** successful exit, otherwise nonzero).
*** 658,664 ****
The program exited with a signal. After the @code{^Z^Zsignalled}, the
annotation continues:
! @example
@var{intro-text}
^Z^Zsignal-name
@var{name}
--- 662,668 ----
The program exited with a signal. After the @code{^Z^Zsignalled}, the
annotation continues:
! @smallexample
@var{intro-text}
^Z^Zsignal-name
@var{name}
*************** annotation continues:
*** 668,674 ****
@var{string}
^Z^Zsignal-string-end
@var{end-text}
! @end example
where @var{name} is the name of the signal, such as @code{SIGILL} or
@code{SIGSEGV}, and @var{string} is the explanation of the signal, such
--- 672,678 ----
@var{string}
^Z^Zsignal-string-end
@var{end-text}
! @end smallexample
where @var{name} is the name of the signal, such as @code{SIGILL} or
@code{SIGSEGV}, and @var{string} is the explanation of the signal, such
*************** The program hit watchpoint number @var{n
*** 698,706 ****
@findex source
The following annotation is used instead of displaying source code:
! @example
^Z^Zsource @var{filename}:@var{line}:@var{character}:@var{middle}:@var{addr}
! @end example
where @var{filename} is an absolute file name indicating which source
file, @var{line} is the line number within that file (where 1 is the
--- 702,710 ----
@findex source
The following annotation is used instead of displaying source code:
! @smallexample
^Z^Zsource @var{filename}:@var{line}:@var{character}:@var{middle}:@var{addr}
! @end smallexample
where @var{filename} is an absolute file name indicating which source
file, @var{line} is the line number within that file (where 1 is the
Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.8
diff -p -r1.8 gdb.texinfo
*** gdb.texinfo 2000/03/28 02:25:13 1.8
--- gdb.texinfo 2000/03/28 16:33:52
***************
*** 1,5 ****
\input texinfo @c -*-texinfo-*-
! @c Copyright 1988-1999
@c Free Software Foundation, Inc.
@c
@c %**start of header
--- 1,5 ----
\input texinfo @c -*-texinfo-*-
! @c Copyright 1988-2000
@c Free Software Foundation, Inc.
@c
@c %**start of header
***************
*** 25,39 ****
@syncodeindex vr cp
@c !!set GDB manual's edition---not the same as GDB version!
! @set EDITION Seventh
@c !!set GDB manual's revision date
! @set DATE February 1999
! @c THIS MANUAL REQUIRES TEXINFO-2 macros and info-makers to format properly.
@c This is a dir.info fragment to support semi-automated addition of
! @c manuals to an info tree. zoo@cygnus.com is developing this facility.
@dircategory Programming & development tools.
@direntry
* Gdb: (gdb). The @sc{gnu} debugger.
--- 25,39 ----
@syncodeindex vr cp
@c !!set GDB manual's edition---not the same as GDB version!
! @set EDITION Eighth
@c !!set GDB manual's revision date
! @set DATE March 2000
! @c THIS MANUAL REQUIRES TEXINFO 3.12 OR LATER.
@c This is a dir.info fragment to support semi-automated addition of
! @c manuals to an info tree.
@dircategory Programming & development tools.
@direntry
* Gdb: (gdb). The @sc{gnu} debugger.
*************** This is the @value{EDITION} Edition, @va
*** 47,53 ****
of @cite{Debugging with @value{GDBN}: the @sc{gnu} Source-Level Debugger}
for @value{GDBN} Version @value{GDBVN}.
! Copyright (C) 1988-1999 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
--- 47,53 ----
of @cite{Debugging with @value{GDBN}: the @sc{gnu} Source-Level Debugger}
for @value{GDBN} Version @value{GDBVN}.
! Copyright (C) 1988-2000 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
*************** into another language, under the above c
*** 85,101 ****
}
@end tex
- @c ISBN seems to be wrong...
-
@vskip 0pt plus 1filll
! Copyright @copyright{} 1988-1999 Free Software Foundation, Inc.
@sp 2
Published by the Free Software Foundation @*
59 Temple Place - Suite 330, @*
Boston, MA 02111-1307 USA @*
! Printed copies are available for $20 each. @*
! ISBN 1-882114-11-6 @*
!
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
--- 85,98 ----
}
@end tex
@vskip 0pt plus 1filll
! Copyright @copyright{} 1988-2000 Free Software Foundation, Inc.
@sp 2
Published by the Free Software Foundation @*
59 Temple Place - Suite 330, @*
Boston, MA 02111-1307 USA @*
! ISBN 1-882114-77-9 @*
!
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
*************** into another language, under the above c
*** 110,127 ****
@end titlepage
@page
-
- @node Top, Summary, (dir), (dir)
@ifinfo
@top Debugging with @value{GDBN}
This file describes @value{GDBN}, the @sc{gnu} symbolic debugger.
This is the @value{EDITION} Edition, @value{DATE}, for @value{GDBN} Version
@value{GDBVN}.
! Copyright (C) 1988-1999 Free Software Foundation, Inc.
@end ifinfo
@menu
* Summary:: Summary of @value{GDBN}
* Sample Session:: A sample @value{GDBN} session
--- 107,173 ----
@end titlepage
@page
@ifinfo
+ @node Top, Summary, (dir), (dir)
+
@top Debugging with @value{GDBN}
This file describes @value{GDBN}, the @sc{gnu} symbolic debugger.
This is the @value{EDITION} Edition, @value{DATE}, for @value{GDBN} Version
@value{GDBVN}.
+
+ Copyright (C) 1988-2000 Free Software Foundation, Inc.
+
+ @menu
+ * Summary:: Summary of @value{GDBN}
+ * Sample Session:: A sample @value{GDBN} session
+
+ * Invocation:: Getting in and out of @value{GDBN}
+ * Commands:: @value{GDBN} commands
+ * Running:: Running programs under @value{GDBN}
+ * Stopping:: Stopping and continuing
+ * Stack:: Examining the stack
+ * Source:: Examining source files
+ * Data:: Examining data
! * Languages:: Using @value{GDBN} with different languages
!
! * Symbols:: Examining the symbol table
! * Altering:: Altering execution
! * GDB Files:: @value{GDBN} files
! * Targets:: Specifying a debugging target
! * Configurations:: Configuration-specific information
! * Controlling GDB:: Controlling @value{GDBN}
! * Sequences:: Canned sequences of commands
! * Emacs:: Using @value{GDBN} under @sc{gnu} Emacs
! * Annotations:: @value{GDBN}'s annotation interface.
!
! * GDB Bugs:: Reporting bugs in @value{GDBN}
! * Formatting Documentation:: How to format and print @value{GDBN} documentation
!
! * Command Line Editing:: Command Line Editing
! * Using History Interactively:: Using History Interactively
! * Installing GDB:: Installing GDB
! * Index:: Index
! @end menu
!
@end ifinfo
+
+ @c the replication sucks, but this avoids a texinfo 3.12 lameness
+
+ @ifhtml
+ @node Top
+
+ @top Debugging with @value{GDBN}
+
+ This file describes @value{GDBN}, the @sc{gnu} symbolic debugger.
+
+ This is the @value{EDITION} Edition, @value{DATE}, for @value{GDBN} Version
+ @value{GDBVN}.
+
+ Copyright (C) 1988-2000 Free Software Foundation, Inc.
+
@menu
* Summary:: Summary of @value{GDBN}
* Sample Session:: A sample @value{GDBN} session
*************** Copyright (C) 1988-1999 Free Software Fo
*** 144,150 ****
* Controlling GDB:: Controlling @value{GDBN}
* Sequences:: Canned sequences of commands
* Emacs:: Using @value{GDBN} under @sc{gnu} Emacs
! * Annotations:: @value{GDBN}'s annotations interface.
* GDB Bugs:: Reporting bugs in @value{GDBN}
* Formatting Documentation:: How to format and print @value{GDBN} documentation
--- 190,196 ----
* Controlling GDB:: Controlling @value{GDBN}
* Sequences:: Canned sequences of commands
* Emacs:: Using @value{GDBN} under @sc{gnu} Emacs
! * Annotations:: @value{GDBN}'s annotation interface.
* GDB Bugs:: Reporting bugs in @value{GDBN}
* Formatting Documentation:: How to format and print @value{GDBN} documentation
*************** Copyright (C) 1988-1999 Free Software Fo
*** 155,161 ****
* Index:: Index
@end menu
! @node Summary, Sample Session, Top, Top
@unnumbered Summary of @value{GDBN}
The purpose of a debugger such as @value{GDBN} is to allow you to see what is
--- 201,209 ----
* Index:: Index
@end menu
! @end ifhtml
!
! @node Summary
@unnumbered Summary of @value{GDBN}
The purpose of a debugger such as @value{GDBN} is to allow you to see what is
*************** underscore.
*** 205,211 ****
* Contributors:: Contributors to GDB
@end menu
! @node Free Software, Contributors, Summary, Summary
@unnumberedsec Free software
@value{GDBN} is @dfn{free software}, protected by the @sc{gnu}
--- 253,259 ----
* Contributors:: Contributors to GDB
@end menu
! @node Free Software
@unnumberedsec Free software
@value{GDBN} is @dfn{free software}, protected by the @sc{gnu}
*************** Fundamentally, the General Public Licens
*** 221,227 ****
you have these freedoms and that you cannot take these freedoms away
from anyone else.
! @node Contributors, , Free Software, Summary
@unnumberedsec Contributors to @value{GDBN}
Richard Stallman was the original author of @value{GDBN}, and of many
--- 269,275 ----
you have these freedoms and that you cannot take these freedoms away
from anyone else.
! @node Contributors
@unnumberedsec Contributors to @value{GDBN}
Richard Stallman was the original author of @value{GDBN}, and of many
*************** Thomas, Michael Tiemann, Tom Tromey, Ron
*** 360,366 ****
Zuhn have made contributions both large and small.
! @node Sample Session, Invocation, Summary, Top
@chapter A Sample @value{GDBN} Session
You can use this manual at your leisure to read all about @value{GDBN}.
--- 408,414 ----
Zuhn have made contributions both large and small.
! @node Sample Session
@chapter A Sample @value{GDBN} Session
You can use this manual at your leisure to read all about @value{GDBN}.
*************** session with the @value{GDBN} @code{quit
*** 630,636 ****
(@value{GDBP}) @b{quit}
@end smallexample
! @node Invocation, Commands, Sample Session, Top
@chapter Getting In and Out of @value{GDBN}
This chapter discusses how to start @value{GDBN}, and how to get out of it.
--- 678,684 ----
(@value{GDBP}) @b{quit}
@end smallexample
! @node Invocation
@chapter Getting In and Out of @value{GDBN}
This chapter discusses how to start @value{GDBN}, and how to get out of it.
*************** type @kbd{quit} or @kbd{C-d} to exit.
*** 648,654 ****
* Shell Commands:: How to use shell commands inside @value{GDBN}
@end menu
! @node Invoking GDB, Quitting GDB, Invocation, Invocation
@section Invoking @value{GDBN}
Invoke @value{GDBN} by running the program @code{@value{GDBP}}. Once started,
--- 696,702 ----
* Shell Commands:: How to use shell commands inside @value{GDBN}
@end menu
! @node Invoking GDB
@section Invoking @value{GDBN}
Invoke @value{GDBN} by running the program @code{@value{GDBP}}. Once started,
*************** in sequential order. The order makes a
*** 725,731 ****
* Mode Options:: Choosing modes
@end menu
! @node File Options, Mode Options, Invoking GDB, Invoking GDB
@subsection Choosing files
When @value{GDBN} starts, it reads any arguments other than options as
--- 773,779 ----
* Mode Options:: Choosing modes
@end menu
! @node File Options
@subsection Choosing files
When @value{GDBN} starts, it reads any arguments other than options as
*************** but build a @file{.syms} file for future
*** 833,839 ****
gdb -batch -nx -mapped -readnow programname
@end example
! @node Mode Options, , File Options, Invoking GDB
@subsection Choosing modes
You can run @value{GDBN} in various alternative modes---for example, in
--- 881,887 ----
gdb -batch -nx -mapped -readnow programname
@end example
! @node Mode Options
@subsection Choosing modes
You can run @value{GDBN} in various alternative modes---for example, in
*************** no-warranty blurb, and exit.
*** 1014,1020 ****
@end table
! @node Quitting GDB, Shell Commands, Invoking GDB, Invocation
@section Quitting @value{GDBN}
@cindex exiting @value{GDBN}
@cindex leaving @value{GDBN}
--- 1062,1068 ----
@end table
! @node Quitting GDB
@section Quitting @value{GDBN}
@cindex exiting @value{GDBN}
@cindex leaving @value{GDBN}
*************** If you have been using @value{GDBN} to c
*** 1042,1048 ****
device, you can release it with the @code{detach} command
(@pxref{Attach, ,Debugging an already-running process}).
! @node Shell Commands, , Quitting GDB, Invocation
@section Shell commands
If you need to execute occasional shell commands during your
--- 1090,1096 ----
device, you can release it with the @code{detach} command
(@pxref{Attach, ,Debugging an already-running process}).
! @node Shell Commands
@section Shell commands
If you need to execute occasional shell commands during your
*************** Execute the @code{make} program with the
*** 1071,1077 ****
arguments. This is equivalent to @samp{shell make @var{make-args}}.
@end table
! @node Commands, Running, Invocation, Top
@chapter @value{GDBN} Commands
You can abbreviate a @value{GDBN} command to the first few letters of the command
--- 1119,1125 ----
arguments. This is equivalent to @samp{shell make @var{make-args}}.
@end table
! @node Commands
@chapter @value{GDBN} Commands
You can abbreviate a @value{GDBN} command to the first few letters of the command
*************** show you the alternatives available, if
*** 1086,1092 ****
* Help:: How to ask @value{GDBN} for help
@end menu
! @node Command Syntax, Completion, Commands, Commands
@section Command syntax
A @value{GDBN} command is a single line of input. There is no limit on
--- 1134,1140 ----
* Help:: How to ask @value{GDBN} for help
@end menu
! @node Command Syntax
@section Command syntax
A @value{GDBN} command is a single line of input. There is no limit on
*************** Any text from a @kbd{#} to the end of th
*** 1129,1135 ****
nothing. This is useful mainly in command files (@pxref{Command
Files,,Command files}).
! @node Completion, Help, Command Syntax, Commands
@section Command completion
@cindex completion
--- 1177,1183 ----
nothing. This is useful mainly in command files (@pxref{Command
Files,,Command files}).
! @node Completion
@section Command completion
@cindex completion
*************** overload-resolution off} to disable over
*** 1248,1254 ****
see @ref{Debugging C plus plus, ,@value{GDBN} features for C++}.
! @node Help, , Completion, Commands
@section Getting help
@cindex online documentation
@kindex help
--- 1296,1302 ----
see @ref{Debugging C plus plus, ,@value{GDBN} features for C++}.
! @node Help
@section Getting help
@cindex online documentation
@kindex help
*************** apropos reload
*** 1331,1340 ****
@noindent results in:
@smallexample
! @group
! set symbol-reloading -- Set dynamic symbol table reloading multiple times in one run
! show symbol-reloading -- Show dynamic symbol table reloading multiple times in one run
! @end group
@end smallexample
@kindex complete
--- 1379,1390 ----
@noindent results in:
@smallexample
! @c @group
! set symbol-reloading -- Set dynamic symbol table reloading
! multiple times in one run
! show symbol-reloading -- Show dynamic symbol table reloading
! multiple times in one run
! @c @end group
@end smallexample
@kindex complete
*************** if your version of @value{GDBN} comes wi
*** 1433,1439 ****
@end table
! @node Running, Stopping, Commands, Top
@chapter Running Programs Under @value{GDBN}
When you run a program under @value{GDBN}, you must first generate
--- 1483,1489 ----
@end table
! @node Running
@chapter Running Programs Under @value{GDBN}
When you run a program under @value{GDBN}, you must first generate
*************** kill a child process.
*** 1459,1465 ****
* Processes:: Debugging programs with multiple processes
@end menu
! @node Compilation, Starting, Running, Running
@section Compiling for debugging
In order to debug a program effectively, you need to generate
--- 1509,1515 ----
* Processes:: Debugging programs with multiple processes
@end menu
! @node Compilation
@section Compiling for debugging
In order to debug a program effectively, you need to generate
*************** Older versions of the @sc{gnu} C compile
*** 1500,1506 ****
format; if your @sc{gnu} C compiler has this option, do not use it.
@need 2000
! @node Starting, Arguments, Compilation, Running
@section Starting your program
@cindex starting
@cindex running
--- 1550,1556 ----
format; if your @sc{gnu} C compiler has this option, do not use it.
@need 2000
! @node Starting
@section Starting your program
@cindex starting
@cindex running
*************** time @value{GDBN} read its symbols, @val
*** 1576,1582 ****
table, and reads it again. When it does this, @value{GDBN} tries to retain
your current breakpoints.
! @node Arguments, Environment, Starting, Running
@section Your program's arguments
@cindex arguments (to your program)
--- 1626,1632 ----
table, and reads it again. When it does this, @value{GDBN} tries to retain
your current breakpoints.
! @node Arguments
@section Your program's arguments
@cindex arguments (to your program)
*************** it again without arguments.
*** 1610,1616 ****
Show the arguments to give your program when it is started.
@end table
! @node Environment, Working Directory, Arguments, Running
@section Your program's environment
@cindex environment (of your program)
--- 1660,1666 ----
Show the arguments to give your program when it is started.
@end table
! @node Environment
@section Your program's environment
@cindex environment (of your program)
*************** your program. You may wish to move sett
*** 1693,1699 ****
files that are only run when you sign on, such as @file{.login} or
@file{.profile}.
! @node Working Directory, Input/Output, Environment, Running
@section Your program's working directory
@cindex working directory (of your program)
--- 1743,1749 ----
files that are only run when you sign on, such as @file{.login} or
@file{.profile}.
! @node Working Directory
@section Your program's working directory
@cindex working directory (of your program)
*************** Set the @value{GDBN} working directory t
*** 1717,1723 ****
Print the @value{GDBN} working directory.
@end table
! @node Input/Output, Attach, Working Directory, Running
@section Your program's input and output
@cindex redirection
--- 1767,1773 ----
Print the @value{GDBN} working directory.
@end table
! @node Input/Output
@section Your program's input and output
@cindex redirection
*************** When you use the @code{tty} command or r
*** 1771,1777 ****
command, only the input @emph{for your program} is affected. The input
for @value{GDBN} still comes from your terminal.
! @node Attach, Kill Process, Input/Output, Running
@section Debugging an already-running process
@kindex attach
@cindex attach
--- 1821,1827 ----
command, only the input @emph{for your program} is affected. The input
for @value{GDBN} still comes from your terminal.
! @node Attach
@section Debugging an already-running process
@kindex attach
@cindex attach
*************** control whether or not you need to confi
*** 1827,1833 ****
confirm} command (@pxref{Messages/Warnings, ,Optional warnings and
messages}).
! @node Kill Process, Threads, Attach, Running
@section Killing the child process
@table @code
--- 1877,1883 ----
confirm} command (@pxref{Messages/Warnings, ,Optional warnings and
messages}).
! @node Kill Process
@section Killing the child process
@table @code
*************** next type @code{run}, @value{GDBN} notic
*** 1852,1858 ****
reads the symbol table again (while trying to preserve your current
breakpoint settings).
! @node Threads, Processes, Kill Process, Running
@section Debugging programs with multiple threads
@cindex threads of execution
--- 1902,1908 ----
reads the symbol table again (while trying to preserve your current
breakpoint settings).
! @node Threads
@section Debugging programs with multiple threads
@cindex threads of execution
*************** For example,
*** 2017,2025 ****
@example
(@value{GDBP}) info threads
! * 3 system thread 26607 worker (wptr=0x7b09c318 "@@") at quicksort.c:137
! 2 system thread 26606 0x7b0030d8 in __ksleep () from /usr/lib/libc.2
! 1 system thread 27905 0x7b003498 in _brk () from /usr/lib/libc.2
@end example
@table @code
--- 2067,2078 ----
@example
(@value{GDBP}) info threads
! * 3 system thread 26607 worker (wptr=0x7b09c318 "@@") \@*
! at quicksort.c:137
! 2 system thread 26606 0x7b0030d8 in __ksleep () \@*
! from /usr/lib/libc.2
! 1 system thread 27905 0x7b003498 in _brk () \@*
! from /usr/lib/libc.2
@end example
@table @code
*************** programs with multiple threads.
*** 2069,2075 ****
@xref{Set Watchpoints,,Setting watchpoints}, for information about
watchpoints in programs with multiple threads.
! @node Processes, , Threads, Running
@section Debugging programs with multiple processes
@cindex fork, debugging programs which call
--- 2122,2128 ----
@xref{Set Watchpoints,,Setting watchpoints}, for information about
watchpoints in programs with multiple threads.
! @node Processes
@section Debugging programs with multiple processes
@cindex fork, debugging programs which call
*************** You can use the @code{catch} command to
*** 2146,2152 ****
a @code{fork}, @code{vfork}, or @code{exec} call is made. @xref{Set
Catchpoints, ,Setting catchpoints}.
! @node Stopping, Stack, Running, Top
@chapter Stopping and Continuing
The principal purposes of using a debugger are so that you can stop your
--- 2199,2205 ----
a @code{fork}, @code{vfork}, or @code{exec} call is made. @xref{Set
Catchpoints, ,Setting catchpoints}.
! @node Stopping
@chapter Stopping and Continuing
The principal purposes of using a debugger are so that you can stop your
*************** running or not, what process it is, and
*** 2175,2181 ****
* Thread Stops:: Stopping and starting multi-thread programs
@end menu
! @node Breakpoints, Continuing and Stepping, Stopping, Stopping
@section Breakpoints, watchpoints, and catchpoints
@cindex breakpoints
--- 2228,2234 ----
* Thread Stops:: Stopping and starting multi-thread programs
@end menu
! @node Breakpoints
@section Breakpoints, watchpoints, and catchpoints
@cindex breakpoints
*************** all breakpoint in that range are operate
*** 2249,2255 ****
* Error in Breakpoints:: ``Cannot insert breakpoints''
@end menu
! @node Set Breaks, Set Watchpoints, Breakpoints, Breakpoints
@subsection Setting breakpoints
@c FIXME LMB what does GDB do if no code on line of breakpt?
--- 2302,2308 ----
* Error in Breakpoints:: ``Cannot insert breakpoints''
@end menu
! @node Set Breaks
@subsection Setting breakpoints
@c FIXME LMB what does GDB do if no code on line of breakpt?
*************** Shared library events.
*** 2481,2487 ****
@end table
! @node Set Watchpoints, Set Catchpoints, Set Breaks, Breakpoints
@subsection Setting watchpoints
@cindex setting watchpoints
--- 2534,2540 ----
@end table
! @node Set Watchpoints
@subsection Setting watchpoints
@cindex setting watchpoints
*************** when a non-current thread's activity cha
*** 2624,2630 ****
watchpoints, in contrast, watch an expression in all threads.)
@end quotation
! @node Set Catchpoints, Delete Breaks, Set Watchpoints, Breakpoints
@subsection Setting catchpoints
@cindex catchpoints, setting
@cindex exception handlers
--- 2677,2683 ----
watchpoints, in contrast, watch an expression in all threads.)
@end quotation
! @node Set Catchpoints
@subsection Setting catchpoints
@cindex catchpoints, setting
@cindex exception handlers
*************** breakpoints to stop your program when an
*** 2732,2738 ****
raised.
! @node Delete Breaks, Disabling, Set Catchpoints, Breakpoints
@subsection Deleting breakpoints
@cindex clearing breakpoints, watchpoints, catchpoints
--- 2785,2791 ----
raised.
! @node Delete Breaks
@subsection Deleting breakpoints
@cindex clearing breakpoints, watchpoints, catchpoints
*************** breakpoints (@value{GDBN} asks confirmat
*** 2777,2783 ****
confirm off}). You can abbreviate this command as @code{d}.
@end table
! @node Disabling, Conditions, Delete Breaks, Breakpoints
@subsection Disabling breakpoints
@kindex disable breakpoints
--- 2830,2836 ----
confirm off}). You can abbreviate this command as @code{d}.
@end table
! @node Disabling
@subsection Disabling breakpoints
@kindex disable breakpoints
*************** breakpoint of its own, but it does not c
*** 2850,2856 ****
breakpoints; see @ref{Continuing and Stepping, ,Continuing and
stepping}.)
! @node Conditions, Break Commands, Disabling, Breakpoints
@subsection Break conditions
@cindex conditional breakpoints
@cindex breakpoint conditions
--- 2903,2909 ----
breakpoints; see @ref{Continuing and Stepping, ,Continuing and
stepping}.)
! @node Conditions
@subsection Break conditions
@cindex conditional breakpoints
@cindex breakpoint conditions
*************** variables}.
*** 2967,2973 ****
Ignore counts apply to breakpoints, watchpoints, and catchpoints.
! @node Break Commands, Breakpoint Menus, Conditions, Breakpoints
@subsection Breakpoint command lists
@cindex breakpoint commands
--- 3020,3026 ----
Ignore counts apply to breakpoints, watchpoints, and catchpoints.
! @node Break Commands
@subsection Breakpoint command lists
@cindex breakpoint commands
*************** cont
*** 3048,3054 ****
end
@end example
! @node Breakpoint Menus, Error in Breakpoints, Break Commands, Breakpoints
@subsection Breakpoint menus
@cindex overloading
@cindex symbol overloading
--- 3101,3107 ----
end
@end example
! @node Breakpoint Menus
@subsection Breakpoint menus
@cindex overloading
@cindex symbol overloading
*************** Use the "delete" command to delete unwan
*** 3095,3101 ****
@end smallexample
@c @ifclear BARETARGET
! @node Error in Breakpoints, , Breakpoint Menus, Breakpoints
@subsection ``Cannot insert breakpoints''
@c
@c FIXME!! 14/6/95 Is there a real example of this? Let's use it.
--- 3148,3154 ----
@end smallexample
@c @ifclear BARETARGET
! @node Error in Breakpoints
@subsection ``Cannot insert breakpoints''
@c
@c FIXME!! 14/6/95 Is there a real example of this? Let's use it.
*************** When this message is printed, you need t
*** 3148,3154 ****
hardware-assisted breakpoints and watchpoints, and then continue.
! @node Continuing and Stepping, Signals, Breakpoints, Stopping
@section Continuing and stepping
@cindex stepping
--- 3201,3207 ----
hardware-assisted breakpoints and watchpoints, and then continue.
! @node Continuing and Stepping
@section Continuing and stepping
@cindex stepping
*************** proceed until the function returns.
*** 3350,3356 ****
An argument is a repeat count, as in @code{next}.
@end table
! @node Signals, Thread Stops, Continuing and Stepping, Stopping
@section Signals
@cindex signals
--- 3403,3409 ----
An argument is a repeat count, as in @code{next}.
@end table
! @node Signals
@section Signals
@cindex signals
*************** a result of the fatal signal once it saw
*** 3446,3452 ****
you can continue with @samp{signal 0}. @xref{Signaling, ,Giving your
program a signal}.
! @node Thread Stops, , Signals, Stopping
@section Stopping and starting multi-thread programs
When your program has multiple threads (@pxref{Threads,, Debugging
--- 3499,3505 ----
you can continue with @samp{signal 0}. @xref{Signaling, ,Giving your
program a signal}.
! @node Thread Stops
@section Stopping and starting multi-thread programs
When your program has multiple threads (@pxref{Threads,, Debugging
*************** Display the current scheduler locking mo
*** 3531,3537 ****
@end table
! @node Stack, Source, Stopping, Top
@chapter Examining the Stack
When your program has stopped, the first thing you need to know is where it
--- 3584,3590 ----
@end table
! @node Stack
@chapter Examining the Stack
When your program has stopped, the first thing you need to know is where it
*************** currently executing frame and describes
*** 3570,3576 ****
@end menu
! @node Frames, Backtrace, Stack, Stack
@section Stack frames
@cindex frame, definition
--- 3623,3629 ----
@end menu
! @node Frames
@section Stack frames
@cindex frame, definition
*************** and so on upward. These numbers do not
*** 3608,3618 ****
they are assigned by @value{GDBN} to give you a way of designating stack
frames in @value{GDBN} commands.
! @c below produces an acceptable overful hbox. --mew 13aug1993
@cindex frameless execution
Some compilers provide a way to compile functions so that they operate
! without stack frames. (For example, the @code{@value{GCC}} option
! @samp{-fomit-frame-pointer} generates functions without a frame.)
This is occasionally done with heavily used library functions to save
the frame setup time. @value{GDBN} has limited facilities for dealing
with these function invocations. If the innermost function invocation
--- 3661,3675 ----
they are assigned by @value{GDBN} to give you a way of designating stack
frames in @value{GDBN} commands.
! @c The -fomit-frame-pointer below perennially causes hbox overflow
! @c underflow problems.
@cindex frameless execution
Some compilers provide a way to compile functions so that they operate
! without stack frames. (For example, the @value{GCC} option
! @example
! @samp{-fomit-frame-pointer}
! @end example
! generates functions without a frame.)
This is occasionally done with heavily used library functions to save
the frame setup time. @value{GDBN} has limited facilities for dealing
with these function invocations. If the innermost function invocation
*************** to another without printing the frame.
*** 3636,3642 ****
@code{frame}.
@end table
! @node Backtrace, Selection, Frames, Stack
@section Backtraces
@cindex backtraces
--- 3693,3699 ----
@code{frame}.
@end table
! @node Backtrace
@section Backtraces
@cindex backtraces
*************** The display for frame zero does not begi
*** 3699,3705 ****
value, indicating that your program has stopped at the beginning of the
code for line @code{993} of @code{builtin.c}.
! @node Selection, Frame Info, Backtrace, Stack
@section Selecting a frame
Most commands for examining the stack and other data in your program work on
--- 3756,3762 ----
value, indicating that your program has stopped at the beginning of the
code for line @code{993} of @code{builtin.c}.
! @node Selection
@section Selecting a frame
Most commands for examining the stack and other data in your program work on
*************** in @value{GDBN} command scripts, where t
*** 3785,3791 ****
distracting.
@end table
! @node Frame Info, , Selection, Stack
@section Information about a frame
There are several other commands to print information about the selected
--- 3842,3848 ----
distracting.
@end table
! @node Frame Info
@section Information about a frame
There are several other commands to print information about the selected
*************** exception handlers, visit the associated
*** 3861,3867 ****
@end table
! @node Source, Data, Stack, Top
@chapter Examining Source Files
@value{GDBN} can print parts of your program's source, since the debugging
--- 3918,3924 ----
@end table
! @node Source
@chapter Examining Source Files
@value{GDBN} can print parts of your program's source, since the debugging
*************** prefer to use Emacs facilities to view s
*** 3883,3889 ****
* Machine Code:: Source and machine code
@end menu
! @node List, Search, Source, Source
@section Printing source lines
@kindex list
--- 3940,3946 ----
* Machine Code:: Source and machine code
@end menu
! @node List
@section Printing source lines
@kindex list
*************** Specifies the line containing the progra
*** 4000,4006 ****
@var{address} may be any expression.
@end table
! @node Search, Source Path, List, Source
@section Searching source files
@cindex searching
@kindex reverse-search
--- 4057,4063 ----
@var{address} may be any expression.
@end table
! @node Search
@section Searching source files
@cindex searching
@kindex reverse-search
*************** for @var{regexp}. It lists the line tha
*** 4026,4032 ****
this command as @code{rev}.
@end table
! @node Source Path, Machine Code, Search, Source
@section Specifying source directories
@cindex source path
--- 4083,4089 ----
this command as @code{rev}.
@end table
! @node Source Path
@section Specifying source directories
@cindex source path
*************** directories you want in the source path.
*** 4109,4115 ****
directories in one command.
@end enumerate
! @node Machine Code, , Source Path, Source
@section Source and machine code
You can use the command @code{info line} to map source lines to program
--- 4166,4172 ----
directories in one command.
@end enumerate
! @node Machine Code
@section Source and machine code
You can use the command @code{info line} to map source lines to program
*************** assemblers for x86-based targets.
*** 4210,4216 ****
@end table
! @node Data, Languages, Source, Top
@chapter Examining Data
@cindex printing data
--- 4267,4273 ----
@end table
! @node Data
@chapter Examining Data
@cindex printing data
*************** Table}.
*** 4265,4271 ****
* Floating Point Hardware:: Floating point hardware
@end menu
! @node Expressions, Variables, Data, Data
@section Expressions
@cindex expressions
--- 4322,4328 ----
* Floating Point Hardware:: Floating point hardware
@end menu
! @node Expressions
@section Expressions
@cindex expressions
*************** a cast). This construct is allowed rega
*** 4318,4324 ****
normally supposed to reside at @var{addr}.
@end table
! @node Variables, Arrays, Expressions, Data
@section Program variables
The most common kind of expression to use is the name of a variable
--- 4375,4381 ----
normally supposed to reside at @var{addr}.
@end table
! @node Variables
@section Program variables
The most common kind of expression to use is the name of a variable
*************** Program or @sc{gnu} CC, gcc.info, Using
*** 4439,4445 ****
information.
! @node Arrays, Output Formats, Variables, Data
@section Artificial arrays
@cindex artificial array
--- 4496,4502 ----
information.
! @node Arrays
@section Artificial arrays
@cindex artificial array
*************** p dtab[$i++]->fv
*** 4511,4517 ****
@dots{}
@end example
! @node Output Formats, Memory, Arrays, Data
@section Output formats
@cindex formatted output
--- 4568,4574 ----
@dots{}
@end example
! @node Output Formats
@section Output formats
@cindex formatted output
*************** To reprint the last value in the value h
*** 4580,4586 ****
you can use the @code{print} command with just a format and no
expression. For example, @samp{p/x} reprints the last value in hex.
! @node Memory, Auto Display, Output Formats, Data
@section Examining memory
You can use the command @code{x} (for ``examine'') to examine memory in
--- 4637,4643 ----
you can use the @code{print} command with just a format and no
expression. For example, @samp{p/x} reprints the last value in hex.
! @node Memory
@section Examining memory
You can use the command @code{x} (for ``examine'') to examine memory in
*************** If the @code{x} command has a repeat cou
*** 4685,4691 ****
are from the last memory unit printed; this is not the same as the last
address printed if several units were printed on the last line of output.
! @node Auto Display, Print Settings, Memory, Data
@section Automatic display
@cindex automatic display
@cindex display of expressions
--- 4742,4748 ----
are from the last memory unit printed; this is not the same as the last
address printed if several units were printed on the last line of output.
! @node Auto Display
@section Automatic display
@cindex automatic display
@cindex display of expressions
*************** there is no variable @code{last_char}---
*** 4781,4787 ****
automatically. The next time your program stops where @code{last_char}
is meaningful, you can enable the display expression once again.
! @node Print Settings, Value History, Auto Display, Data
@section Print settings
@cindex format options
--- 4838,4844 ----
automatically. The next time your program stops where @code{last_char}
is meaningful, you can enable the display expression once again.
! @node Print Settings
@section Print settings
@cindex format options
*************** Do not pretty print C++ virtual function
*** 5142,5148 ****
Show whether C++ virtual function tables are pretty printed, or not.
@end table
! @node Value History, Convenience Vars, Print Settings, Data
@section Value history
@cindex value history
--- 5199,5205 ----
Show whether C++ virtual function tables are pretty printed, or not.
@end table
! @node Value History
@section Value history
@cindex value history
*************** values are available, @code{show values
*** 5219,5225 ****
Pressing @key{RET} to repeat @code{show values @var{n}} has exactly the
same effect as @samp{show values +}.
! @node Convenience Vars, Registers, Value History, Data
@section Convenience variables
@cindex convenience variables
--- 5276,5282 ----
Pressing @key{RET} to repeat @code{show values @var{n}} has exactly the
same effect as @samp{show values +}.
! @node Convenience Vars
@section Convenience variables
@cindex convenience variables
*************** On HP-UX systems, if you refer to a func
*** 5305,5311 ****
begins with a dollar sign, @value{GDBN} searches for a user or system
name first, before it searches for a convenience variable.
! @node Registers, Floating Point Hardware, Convenience Vars, Data
@section Registers
@cindex registers
--- 5362,5368 ----
begins with a dollar sign, @value{GDBN} searches for a user or system
name first, before it searches for a convenience variable.
! @node Registers
@section Registers
@cindex registers
*************** code generated by your compiler. If som
*** 5404,5410 ****
@value{GDBN} is unable to locate the saved registers, the selected stack
frame makes no difference.
! @node Floating Point Hardware, , Registers, Data
@section Floating point hardware
@cindex floating point
--- 5461,5467 ----
@value{GDBN} is unable to locate the saved registers, the selected stack
frame makes no difference.
! @node Floating Point Hardware
@section Floating point hardware
@cindex floating point
*************** floating point chip. Currently, @samp{i
*** 5420,5426 ****
the ARM and x86 machines.
@end table
! @node Languages, Symbols, Data, Top
@chapter Using @value{GDBN} with Different Languages
@cindex languages
--- 5477,5483 ----
the ARM and x86 machines.
@end table
! @node Languages
@chapter Using @value{GDBN} with Different Languages
@cindex languages
*************** language}.
*** 5446,5452 ****
* Support:: Supported languages
@end menu
! @node Setting, Show, Languages, Languages
@section Switching between source languages
There are two ways to control the working language---either have @value{GDBN}
--- 5503,5509 ----
* Support:: Supported languages
@end menu
! @node Setting
@section Switching between source languages
There are two ways to control the working language---either have @value{GDBN}
*************** program, and will display that source co
*** 5480,5486 ****
* Automatically:: Having @value{GDBN} infer the source language
@end menu
! @node Filenames, Manually, Setting, Setting
@subsection List of filename extensions and languages
If a source file name ends in one of the following extensions, then
--- 5537,5543 ----
* Automatically:: Having @value{GDBN} infer the source language
@end menu
! @node Filenames
@subsection List of filename extensions and languages
If a source file name ends in one of the following extensions, then
*************** Assembler source file. This actually be
*** 5520,5526 ****
In addition, you may set the language associated with a filename
extension. @xref{Show, , Displaying the language}.
! @node Manually, Automatically, Filenames, Setting
@subsection Setting the working language
If you allow @value{GDBN} to set the language automatically,
--- 5577,5583 ----
In addition, you may set the language associated with a filename
extension. @xref{Show, , Displaying the language}.
! @node Manually
@subsection Setting the working language
If you allow @value{GDBN} to set the language automatically,
*************** might not have the effect you intended.
*** 5552,5558 ****
printed would be the value of @code{a}. In Modula-2, this means to compare
@code{a} to the result of @code{b+c}, yielding a @code{BOOLEAN} value.
! @node Automatically, , Manually, Setting
@subsection Having @value{GDBN} infer the source language
To have @value{GDBN} set the working language automatically, use
--- 5609,5615 ----
printed would be the value of @code{a}. In Modula-2, this means to compare
@code{a} to the result of @code{b+c}, yielding a @code{BOOLEAN} value.
! @node Automatically
@subsection Having @value{GDBN} infer the source language
To have @value{GDBN} set the working language automatically, use
*************** written in one source language can be us
*** 5571,5577 ****
a different source language. Using @samp{set language auto} in this
case frees you from having to set the working language manually.
! @node Show, Checks, Setting, Languages
@section Displaying the language
The following commands help you find out which language is the
--- 5628,5634 ----
a different source language. Using @samp{set language auto} in this
case frees you from having to set the working language manually.
! @node Show
@section Displaying the language
The following commands help you find out which language is the
*************** the source language @var{language}.
*** 5613,5619 ****
List all the filename extensions and the associated languages.
@end table
! @node Checks, Support, Show, Languages
@section Type and range checking
@quotation
--- 5670,5676 ----
List all the filename extensions and the associated languages.
@end table
! @node Checks
@section Type and range checking
@quotation
*************** for the default settings of supported la
*** 5646,5652 ****
@cindex type checking
@cindex checks, type
! @node Type Checking, Range Checking, Checks, Checks
@subsection An overview of type checking
Some languages, such as Modula-2, are strongly typed, meaning that the
--- 5703,5709 ----
@cindex type checking
@cindex checks, type
! @node Type Checking
@subsection An overview of type checking
Some languages, such as Modula-2, are strongly typed, meaning that the
*************** is setting it automatically.
*** 5717,5723 ****
@cindex range checking
@cindex checks, range
! @node Range Checking, , Type Checking, Checks
@subsection An overview of range checking
In some languages (such as Modula-2), it is an error to exceed the
--- 5774,5780 ----
@cindex range checking
@cindex checks, range
! @node Range Checking
@subsection An overview of range checking
In some languages (such as Modula-2), it is an error to exceed the
*************** Show the current setting of the range ch
*** 5776,5782 ****
being set automatically by @value{GDBN}.
@end table
! @node Support, , Checks, Languages
@section Supported languages
@value{GDBN} supports C, C++, Fortran, Java, Chill, assembly, and Modula-2.
--- 5833,5839 ----
being set automatically by @value{GDBN}.
@end table
! @node Support
@section Supported languages
@value{GDBN} supports C, C++, Fortran, Java, Chill, assembly, and Modula-2.
*************** language reference or tutorial.
*** 5801,5807 ****
* Chill:: Chill
@end menu
! @node C, Modula-2, Support, Support
@subsection C and C++
@cindex C and C++
--- 5858,5864 ----
* Chill:: Chill
@end menu
! @node C
@subsection C and C++
@cindex C and C++
*************** CC, gcc.info, Using @sc{gnu} CC}, for mo
*** 5836,5842 ****
* Debugging C plus plus:: @value{GDBN} features for C++
@end menu
! @node C Operators, C Constants, C, C
@subsubsection C and C++ operators
@cindex C and C++ operators
--- 5893,5899 ----
* Debugging C plus plus:: @value{GDBN} features for C++
@end menu
! @node C Operators
@subsubsection C and C++ operators
@cindex C and C++ operators
*************** predefined meaning.
*** 5996,6002 ****
* C Constants::
@end menu
! @node C Constants, C plus plus expressions, C Operators, C
@subsubsection C and C++ constants
@cindex C and C++ constants
--- 6053,6059 ----
* C Constants::
@end menu
! @node C Constants
@subsubsection C and C++ constants
@cindex C and C++ constants
*************** and @samp{@{&"hi", &"there", &"fred"@}}
*** 6064,6070 ****
* Debugging C::
@end menu
! @node C plus plus expressions, C Defaults, C Constants, C
@subsubsection C++ expressions
@cindex expressions in C++
--- 6121,6127 ----
* Debugging C::
@end menu
! @node C plus plus expressions
@subsubsection C++ expressions
@cindex expressions in C++
*************** calling virtual functions correctly, pri
*** 6169,6175 ****
objects, calling functions in a base subobject, casting objects, and
invoking user-defined operators.
! @node C Defaults, C Checks, C plus plus expressions, C
@subsubsection C and C++ defaults
@cindex C and C++ defaults
--- 6226,6232 ----
objects, calling functions in a base subobject, casting objects, and
invoking user-defined operators.
! @node C Defaults
@subsubsection C and C++ defaults
@cindex C and C++ defaults
*************** for further details.
*** 6190,6196 ****
@c unimplemented. If (b) changes, it might make sense to let this node
@c appear even if Mod-2 does not, but meanwhile ignore it. roland 16jul93.
! @node C Checks, Debugging C, C Defaults, C
@subsubsection C and C++ type and range checks
@cindex C and C++ checks
--- 6247,6253 ----
@c unimplemented. If (b) changes, it might make sense to let this node
@c appear even if Mod-2 does not, but meanwhile ignore it. roland 16jul93.
! @node C Checks
@subsubsection C and C++ type and range checks
@cindex C and C++ checks
*************** Range checking, if turned on, is done on
*** 6222,6228 ****
indices are not checked, since they are often used to index a pointer
that is not itself an array.
! @node Debugging C, Debugging C plus plus, C Checks, C
@subsubsection @value{GDBN} and C
The @code{set print union} and @code{show print union} commands apply to
--- 6279,6285 ----
indices are not checked, since they are often used to index a pointer
that is not itself an array.
! @node Debugging C
@subsubsection @value{GDBN} and C
The @code{set print union} and @code{show print union} commands apply to
*************** with pointers and a memory allocation fu
*** 6238,6244 ****
* Debugging C plus plus::
@end menu
! @node Debugging C plus plus, , Debugging C, C
@subsubsection @value{GDBN} features for C++
@cindex commands for C++
--- 6295,6301 ----
* Debugging C plus plus::
@end menu
! @node Debugging C plus plus
@subsubsection @value{GDBN} features for C++
@cindex commands for C++
*************** available choices, or to finish the type
*** 6321,6327 ****
@xref{Completion,, Command completion}, for details on how to do this.
@end table
! @node Modula-2, Chill, C, Support
@subsection Modula-2
@cindex Modula-2, @value{GDBN} support
--- 6378,6384 ----
@xref{Completion,, Command completion}, for details on how to do this.
@end table
! @node Modula-2
@subsection Modula-2
@cindex Modula-2, @value{GDBN} support
*************** table.
*** 6345,6351 ****
* GDB/M2:: @value{GDBN} and Modula-2
@end menu
! @node M2 Operators, Built-In Func/Proc, Modula-2, Modula-2
@subsubsection Operators
@cindex Modula-2 operators
--- 6402,6408 ----
* GDB/M2:: @value{GDBN} and Modula-2
@end menu
! @node M2 Operators
@subsubsection Operators
@cindex Modula-2 operators
*************** treats the use of the operator @code{IN}
*** 6469,6475 ****
@end quotation
@cindex Modula-2 built-ins
! @node Built-In Func/Proc, M2 Constants, M2 Operators, Modula-2
@subsubsection Built-in functions and procedures
Modula-2 also makes available several built-in procedures and functions.
--- 6526,6532 ----
@end quotation
@cindex Modula-2 built-ins
! @node Built-In Func/Proc
@subsubsection Built-in functions and procedures
Modula-2 also makes available several built-in procedures and functions.
*************** an error.
*** 6581,6587 ****
@end quotation
@cindex Modula-2 constants
! @node M2 Constants, M2 Defaults, Built-In Func/Proc, Modula-2
@subsubsection Constants
@value{GDBN} allows you to express the constants of Modula-2 in the following
--- 6638,6644 ----
@end quotation
@cindex Modula-2 constants
! @node M2 Constants
@subsubsection Constants
@value{GDBN} allows you to express the constants of Modula-2 in the following
*************** Pointer constants consist of integral va
*** 6630,6636 ****
Set constants are not yet supported.
@end itemize
! @node M2 Defaults, Deviations, M2 Constants, Modula-2
@subsubsection Modula-2 defaults
@cindex Modula-2 defaults
--- 6687,6693 ----
Set constants are not yet supported.
@end itemize
! @node M2 Defaults
@subsubsection Modula-2 defaults
@cindex Modula-2 defaults
*************** code compiled from a file whose name end
*** 6644,6650 ****
working language to Modula-2. @xref{Automatically, ,Having @value{GDBN} set
the language automatically}, for further details.
! @node Deviations, M2 Checks, M2 Defaults, Modula-2
@subsubsection Deviations from standard Modula-2
@cindex Modula-2, deviations from
--- 6701,6707 ----
working language to Modula-2. @xref{Automatically, ,Having @value{GDBN} set
the language automatically}, for further details.
! @node Deviations
@subsubsection Deviations from standard Modula-2
@cindex Modula-2, deviations from
*************** argument.
*** 6674,6680 ****
All built-in procedures both modify @emph{and} return their argument.
@end itemize
! @node M2 Checks, M2 Scope, Deviations, Modula-2
@subsubsection Modula-2 type and range checks
@cindex Modula-2 checks
--- 6731,6737 ----
All built-in procedures both modify @emph{and} return their argument.
@end itemize
! @node M2 Checks
@subsubsection Modula-2 type and range checks
@cindex Modula-2 checks
*************** whose types are not equivalent is an err
*** 6702,6708 ****
Range checking is done on all mathematical operations, assignment, array
index bounds, and all built-in functions and procedures.
! @node M2 Scope, GDB/M2, M2 Checks, Modula-2
@subsubsection The scope operators @code{::} and @code{.}
@cindex scope
@kindex .
--- 6759,6765 ----
Range checking is done on all mathematical operations, assignment, array
index bounds, and all built-in functions and procedures.
! @node M2 Scope
@subsubsection The scope operators @code{::} and @code{.}
@cindex scope
@kindex .
*************** an error if the identifier @var{id} was
*** 6742,6748 ****
module @var{module}, or if @var{id} is not an identifier in
@var{module}.
! @node GDB/M2, , M2 Scope, Modula-2
@subsubsection @value{GDBN} and Modula-2
Some @value{GDBN} commands have little use when debugging Modula-2 programs.
--- 6799,6805 ----
module @var{module}, or if @var{id} is not an identifier in
@var{module}.
! @node GDB/M2
@subsubsection @value{GDBN} and Modula-2
Some @value{GDBN} commands have little use when debugging Modula-2 programs.
*************** address can be specified by an integral
*** 6763,6769 ****
In @value{GDBN} scripts, the Modula-2 inequality operator @code{#} is
interpreted as the beginning of a comment. Use @code{<>} instead.
! @node Chill, , Modula-2, Support
@subsection Chill
The extensions made to @value{GDBN} to support Chill only support output
--- 6820,6826 ----
In @value{GDBN} scripts, the Modula-2 inequality operator @code{#} is
interpreted as the beginning of a comment. Use @code{<>} instead.
! @node Chill
@subsection Chill
The extensions made to @value{GDBN} to support Chill only support output
*************** of @value{GDBN} which support these topi
*** 6785,6791 ****
* Chill defaults::
@end menu
! @node How modes are displayed, Locations, Chill, Chill
@subsubsection How modes are displayed
The Chill Datatype- (Mode) support of @value{GDBN} is directly related
--- 6842,6848 ----
* Chill defaults::
@end menu
! @node How modes are displayed
@subsubsection How modes are displayed
The Chill Datatype- (Mode) support of @value{GDBN} is directly related
*************** type = SET (karli = 10, susi = 20, fritz
*** 6813,6822 ****
@end smallexample
If the type is an unnumbered set the set element values are omitted.
@item
! @emph{Range Mode} which is displayed by @code{type = <basemode>
! (<lower bound> : <upper bound>)}, where @code{<lower bound>, <upper
! bound>} can be of any discrete literal expression (e.g. set element
! names).
@end itemize
@item @r{@emph{Powerset Mode:}}
--- 6870,6881 ----
@end smallexample
If the type is an unnumbered set the set element values are omitted.
@item
! @emph{Range Mode} which is displayed by
! @smallexample
! @code{type = <basemode>(<lower bound> : <upper bound>)}
! @end smallexample
! where @code{<lower bound>, <upper bound>} can be of any discrete literal
! expression (e.g. set element names).
@end itemize
@item @r{@emph{Powerset Mode:}}
*************** type, and is therefore not really of int
*** 6852,6862 ****
@item @r{@emph{Synchronization Modes:}}
@itemize @bullet
@item
! @emph{Event Mode} which is displayed by @code{EVENT (<event length>)},
where @code{(<event length>)} is optional.
@item
! @emph{Buffer Mode} which is displayed by @code{BUFFER (<buffer length>)
! <buffer element mode>}, where @code{(<buffer length>)} is optional.
@end itemize
@item @r{@emph{Timing Modes:}}
--- 6911,6927 ----
@item @r{@emph{Synchronization Modes:}}
@itemize @bullet
@item
! @emph{Event Mode} which is displayed by
! @smallexample
! @code{EVENT (<event length>)}
! @end smallexample
where @code{(<event length>)} is optional.
@item
! @emph{Buffer Mode} which is displayed by
! @smallexample
! @code{BUFFER (<buffer length>)<buffer element mode>}
! @end smallexample
! where @code{(<buffer length>)} is optional.
@end itemize
@item @r{@emph{Timing Modes:}}
*************** Real Modes are predefined with @code{REA
*** 6873,6884 ****
@item @r{@emph{String Modes:}}
@itemize @bullet
@item
! @emph{Character String Mode} which is displayed by @code{CHARS(<string
! length>)}, followed by the keyword @code{VARYING} if the String Mode is
! a varying mode
@item
! @emph{Bit String Mode} which is displayed by @code{BOOLS(<string
! length>)}.
@end itemize
@item @r{@emph{Array Mode:}}
--- 6938,6955 ----
@item @r{@emph{String Modes:}}
@itemize @bullet
@item
! @emph{Character String Mode} which is displayed by
! @smallexample
! @code{CHARS(<string length>)}
! @end smallexample
! followed by the keyword @code{VARYING} if the String Mode is a varying
! mode
@item
! @emph{Bit String Mode} which is displayed by
! @smallexample
! @code{BOOLS(<string
! length>)}
! @end smallexample
@end itemize
@item @r{@emph{Array Mode:}}
*************** type = STRUCT (
*** 6914,6920 ****
@end smallexample
@end table
! @node Locations, Values and their Operations, How modes are displayed, Chill
@subsubsection Locations and their accesses
A location in Chill is an object which can contain values.
--- 6985,6991 ----
@end smallexample
@end table
! @node Locations
@subsubsection Locations and their accesses
A location in Chill is an object which can contain values.
*************** represents the address where the referen
*** 6942,6952 ****
value of the location referenced by the pointer, use the dereference
operator @samp{->}.
! Values of procedure mode locations are displayed by @code{@{ PROC
(<argument modes> ) <return mode> @} <address> <name of procedure
! location>}. @code{<argument modes>} is a list of modes according to the
! parameter specification of the procedure and @code{<address>} shows the
! address of the entry point.
@ignore
Locations of instance modes are displayed just like a structure with two
--- 7013,7027 ----
value of the location referenced by the pointer, use the dereference
operator @samp{->}.
! Values of procedure mode locations are displayed by
! @smallexample
! @code{@{ PROC
(<argument modes> ) <return mode> @} <address> <name of procedure
! location>}
! @end smallexample
! @code{<argument modes>} is a list of modes according to the parameter
! specification of the procedure and @code{<address>} shows the address of
! the entry point.
@ignore
Locations of instance modes are displayed just like a structure with two
*************** therefore the result can be quite confus
*** 6995,7001 ****
(@value{GDBP}) print int (s(3 up 4)) XXX TO be filled in !! XXX
@end smallexample
! @node Values and their Operations, Chill type and range checks, Locations, Chill
@subsubsection Values and their Operations
Values are used to alter locations, to investigate complex structures in
--- 7070,7076 ----
(@value{GDBP}) print int (s(3 up 4)) XXX TO be filled in !! XXX
@end smallexample
! @node Values and their Operations
@subsubsection Values and their Operations
Values are used to alter locations, to investigate complex structures in
*************** same manner as in Chill programs refer t
*** 7065,7071 ****
@end itemize
@item String Element Value
! A string element value is specified by @code{<string value>(<index>)},
where @code{<index>} is a integer expression. It delivers a character
value which is equivalent to the character indexed by @code{<index>} in
the string.
--- 7140,7149 ----
@end itemize
@item String Element Value
! A string element value is specified by
! @smallexample
! @code{<string value>(<index>)}
! @end smallexample
where @code{<index>} is a integer expression. It delivers a character
value which is equivalent to the character indexed by @code{<index>} in
the string.
*************** expression, then this procedure is calle
*** 7102,7109 ****
effects. This can lead to confusing results if used carelessly.}.
Values of duration mode locations are represented by @code{ULONG} literals.
- Values of time mode locations are represented by @code{TIME(<secs>:<nsecs>)}.
@ignore
This is not implemented yet:
--- 7180,7191 ----
effects. This can lead to confusing results if used carelessly.}.
Values of duration mode locations are represented by @code{ULONG} literals.
+
+ Values of time mode locations appear as
+ @smallexample
+ @code{TIME(<secs>:<nsecs>)}
+ @end smallexample
@ignore
This is not implemented yet:
*************** Membership operator.
*** 7198,7204 ****
@end table
@end table
! @node Chill type and range checks, Chill defaults, Values and their Operations, Chill
@subsubsection Chill type and range checks
@value{GDBN} considers two Chill variables mode equivalent if the sizes
--- 7280,7286 ----
@end table
@end table
! @node Chill type and range checks
@subsubsection Chill type and range checks
@value{GDBN} considers two Chill variables mode equivalent if the sizes
*************** off}.
*** 7224,7230 ****
see last paragraph ?
@end ignore
! @node Chill defaults, , Chill type and range checks, Chill
@subsubsection Chill defaults
If type and range checking are set automatically by @value{GDBN}, they
--- 7306,7312 ----
see last paragraph ?
@end ignore
! @node Chill defaults
@subsubsection Chill defaults
If type and range checking are set automatically by @value{GDBN}, they
*************** code compiled from a file whose name end
*** 7237,7243 ****
working language to Chill. @xref{Automatically, ,Having @value{GDBN} set
the language automatically}, for further details.
! @node Symbols, Altering, Languages, Top
@chapter Examining the Symbol Table
The commands described in this chapter allow you to inquire about the
--- 7319,7325 ----
working language to Chill. @xref{Automatically, ,Having @value{GDBN} set
the language automatically}, for further details.
! @node Symbols
@chapter Examining the Symbol Table
The commands described in this chapter allow you to inquire about the
*************** Replace symbol definitions for the corre
*** 7402,7413 ****
object file with a particular name is seen again.
@item set symbol-reloading off
! Do not replace symbol definitions when re-encountering object files of
! the same name. This is the default state; if you are not running on a
! system that permits automatically relinking modules, you should leave
! @code{symbol-reloading} off, since otherwise @value{GDBN} may discard symbols
! when linking large programs, that may contain several modules (from
! different directories or libraries) with the same name.
@kindex show symbol-reloading
@item show symbol-reloading
--- 7484,7496 ----
object file with a particular name is seen again.
@item set symbol-reloading off
! Do not replace symbol definitions when encountering object files of the
! same name more than once. This is the default state; if you are not
! running on a system that permits automatic relinking of modules, you
! should leave @code{symbol-reloading} off, since otherwise @value{GDBN}
! may discard symbols when linking large programs, that may contain
! several modules (from different directories or libraries) with the same
! name.
@kindex show symbol-reloading
@item show symbol-reloading
*************** required for each object file from which
*** 7459,7465 ****
@value{GDBN} reads symbols (in the description of @code{symbol-file}).
@end table
! @node Altering, GDB Files, Symbols, Top
@chapter Altering Execution
Once you think you have found an error in your program, you might want to
--- 7542,7548 ----
@value{GDBN} reads symbols (in the description of @code{symbol-file}).
@end table
! @node Altering
@chapter Altering Execution
Once you think you have found an error in your program, you might want to
*************** address, or even return prematurely from
*** 7481,7487 ****
* Patching:: Patching your program
@end menu
! @node Assignment, Jumping, Altering, Altering
@section Assignment to variables
@cindex assignment
--- 7564,7570 ----
* Patching:: Patching your program
@end menu
! @node Assignment
@section Assignment to variables
@cindex assignment
*************** $2 = 1
*** 7552,7558 ****
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/smith/cc_progs/a.out
! "/home/smith/cc_progs/a.out": can't open to read symbols: Invalid bfd target.
(@value{GDBP}) show g
The current BFD target is "=4".
@end group
--- 7635,7642 ----
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/smith/cc_progs/a.out
! "/home/smith/cc_progs/a.out": can't open to read symbols:
! Invalid bfd target.
(@value{GDBP}) show g
The current BFD target is "=4".
@end group
*************** set @{int@}0x83040 = 4
*** 7587,7593 ****
@noindent
stores the value 4 into that memory location.
! @node Jumping, Signaling, Assignment, Altering
@section Continuing at a different address
Ordinarily, when you continue your program, you do so at the place where
--- 7671,7677 ----
@noindent
stores the value 4 into that memory location.
! @node Jumping
@section Continuing at a different address
Ordinarily, when you continue your program, you do so at the place where
*************** that has already executed, in order to e
*** 7640,7646 ****
detail.
@c @group
! @node Signaling, Returning, Jumping, Altering
@section Giving your program a signal
@table @code
--- 7724,7730 ----
detail.
@c @group
! @node Signaling
@section Giving your program a signal
@table @code
*************** the signal handling tables (@pxref{Signa
*** 7669,7675 ****
passes the signal directly to your program.
! @node Returning, Calling, Signaling, Altering
@section Returning from a function
@table @code
--- 7753,7759 ----
passes the signal directly to your program.
! @node Returning
@section Returning from a function
@table @code
*************** returned. In contrast, the @code{finish
*** 7700,7706 ****
and Stepping, ,Continuing and stepping}) resumes execution until the
selected stack frame returns naturally.
! @node Calling, Patching, Returning, Altering
@section Calling program functions
@cindex calling functions
--- 7784,7790 ----
and Stepping, ,Continuing and stepping}) resumes execution until the
selected stack frame returns naturally.
! @node Calling
@section Calling program functions
@cindex calling functions
*************** calls a function in the target. This is
*** 7722,7728 ****
method of putting the scratch area on the stack does not work in systems
that have separate instruction and data spaces.
! @node Patching, , Calling, Altering
@section Patching programs
@cindex patching binaries
--- 7806,7812 ----
method of putting the scratch area on the stack does not work in systems
that have separate instruction and data spaces.
! @node Patching
@section Patching programs
@cindex patching binaries
*************** Display whether executable files and cor
*** 7757,7763 ****
as well as reading.
@end table
! @node GDB Files, Targets, Altering, Top
@chapter @value{GDBN} Files
@value{GDBN} needs to know the file name of the program to be debugged,
--- 7841,7847 ----
as well as reading.
@end table
! @node GDB Files
@chapter @value{GDBN} Files
@value{GDBN} needs to know the file name of the program to be debugged,
*************** program. To debug a core dump of a prev
*** 7770,7776 ****
* Symbol Errors:: Errors reading symbol files
@end menu
! @node Files, Symbol Errors, GDB Files, GDB Files
@section Commands to specify files
@cindex symbol table
--- 7854,7860 ----
* Symbol Errors:: Errors reading symbol files
@end menu
! @node Files
@section Commands to specify files
@cindex symbol table
*************** directories to search, just as the shell
*** 7799,7805 ****
to run. You can change the value of this variable, for both @value{GDBN}
and your program, using the @code{path} command.
! On systems with memory-mapped files, an auxiliary file
@file{@var{filename}.syms} may hold symbol table information for
@var{filename}. If so, @value{GDBN} maps in the symbol table from
@file{@var{filename}.syms}, starting up more quickly. See the
--- 7883,7889 ----
to run. You can change the value of this variable, for both @value{GDBN}
and your program, using the @code{path} command.
! On systems with memory-mapped files, an auxiliary file named
@file{@var{filename}.syms} may hold symbol table information for
@var{filename}. If so, @value{GDBN} maps in the symbol table from
@file{@var{filename}.syms}, starting up more quickly. See the
*************** Otherwise, symbols must be loaded manual
*** 8050,8056 ****
Display the current autoloading size threshold, in megabytes.
@end table
! @node Symbol Errors, , Files, GDB Files
@section Errors reading symbol files
While reading a symbol file, @value{GDBN} occasionally encounters problems,
--- 8134,8140 ----
Display the current autoloading size threshold, in megabytes.
@end table
! @node Symbol Errors
@section Errors reading symbol files
While reading a symbol file, @value{GDBN} occasionally encounters problems,
*************** it.
*** 8139,8145 ****
@end table
! @node Targets, Configurations, GDB Files, Top
@chapter Specifying a Debugging Target
@cindex debugging target
--- 8223,8229 ----
@end table
! @node Targets
@chapter Specifying a Debugging Target
@cindex debugging target
*************** command to specify one of the target typ
*** 8165,8171 ****
@end menu
! @node Active Targets, Target Commands, Targets, Targets
@section Active targets
@cindex stacking targets
--- 8249,8255 ----
@end menu
! @node Active Targets
@section Active targets
@cindex stacking targets
*************** files}). To specify as a target a proce
*** 8200,8206 ****
the @code{attach} command (@pxref{Attach, ,Debugging an already-running
process}).
! @node Target Commands, Byte Order, Active Targets, Targets
@section Commands for managing targets
@table @code
--- 8284,8290 ----
the @code{attach} command (@pxref{Attach, ,Debugging an already-running
process}).
! @node Target Commands
@section Commands for managing targets
@table @code
*************** specifies a fixed address.
*** 8332,8338 ****
@code{load} does not repeat if you press @key{RET} again after using it.
@end table
! @node Byte Order, Remote, Target Commands, Targets
@section Choosing target byte order
@cindex choosing target byte order
--- 8416,8422 ----
@code{load} does not repeat if you press @key{RET} again after using it.
@end table
! @node Byte Order
@section Choosing target byte order
@cindex choosing target byte order
*************** Note that these commands merely adjust i
*** 8372,8378 ****
data on the host, and that they have absolutely no effect on the
target system.
! @node Remote, KOD, Byte Order, Targets
@section Remote debugging
@cindex remote debugging
--- 8456,8462 ----
data on the host, and that they have absolutely no effect on the
target system.
! @node Remote
@section Remote debugging
@cindex remote debugging
*************** configuration of @value{GDBN}; use @code
*** 8396,8402 ****
* Remote Serial:: @value{GDBN} remote serial protocol
@end menu
! @node Remote Serial, , Remote, Remote
@subsection The @value{GDBN} remote serial protocol
@cindex remote serial debugging, overview
--- 8480,8486 ----
* Remote Serial:: @value{GDBN} remote serial protocol
@end menu
! @node Remote Serial
@subsection The @value{GDBN} remote serial protocol
@cindex remote serial debugging, overview
*************** recently added stubs.
*** 8494,8500 ****
* NetWare:: Using the `gdbserve.nlm' program
@end menu
! @node Stub Contents, Bootstrapping, Remote Serial, Remote Serial
@subsubsection What the stub can do for you
@cindex remote serial stub
--- 8578,8584 ----
* NetWare:: Using the `gdbserve.nlm' program
@end menu
! @node Stub Contents
@subsubsection What the stub can do for you
@cindex remote serial stub
*************** to make certain your program stops at a
*** 8545,8551 ****
start of your debugging session.
@end table
! @node Bootstrapping, Debug Session, Stub Contents, Remote Serial
@subsubsection What you must do for the stub
@cindex remote stub, support routines
--- 8629,8635 ----
start of your debugging session.
@end table
! @node Bootstrapping
@subsubsection What you must do for the stub
@cindex remote stub, support routines
*************** but in general the stubs are likely to u
*** 8636,8642 ****
subroutines which @code{@value{GCC}} generates as inline code.
! @node Debug Session, Protocol, Bootstrapping, Remote Serial
@subsubsection Putting it all together
@cindex remote serial debugging summary
--- 8720,8726 ----
subroutines which @code{@value{GCC}} generates as inline code.
! @node Debug Session
@subsubsection Putting it all together
@cindex remote serial debugging summary
*************** steps.
*** 8645,8651 ****
@enumerate
@item
! Make sure you have the supporting low-level routines
(@pxref{Bootstrapping,,What you must do for the stub}):
@display
@code{getDebugChar}, @code{putDebugChar},
--- 8729,8735 ----
@enumerate
@item
! Make sure you have defined the supporting low-level routines
(@pxref{Bootstrapping,,What you must do for the stub}):
@display
@code{getDebugChar}, @code{putDebugChar},
*************** If you type @kbd{y}, @value{GDBN} abando
*** 8742,8748 ****
remote} again to connect once more.) If you type @kbd{n}, @value{GDBN}
goes back to waiting.
! @node Protocol, Server, Debug Session, Remote Serial
@subsubsection Communication protocol
@cindex debugging stub, example
--- 8826,8832 ----
remote} again to connect once more.) If you type @kbd{n}, @value{GDBN}
goes back to waiting.
! @node Protocol
@subsubsection Communication protocol
@cindex debugging stub, example
*************** bytes. For a software breakpoint, @var{
*** 9264,9270 ****
the instruction to be patched. For hardware breakpoints and watchpoints
@var{length} specifies the memory region to be monitored. To avoid
potential problems with duplicate packets, the operations should be
! implemented in an ident-potentent way.
@item
@tab reply @code{E}@var{NN}
@tab for an error
--- 9348,9354 ----
the instruction to be patched. For hardware breakpoints and watchpoints
@var{length} specifies the memory region to be monitored. To avoid
potential problems with duplicate packets, the operations should be
! implemented in an idempotent way.
@item
@tab reply @code{E}@var{NN}
@tab for an error
*************** applicable for certains sorts of targets
*** 9312,9325 ****
@tab
The process terminated with signal @var{AA}.
! @item @code{N}@var{AA}@code{;}@var{tttttttt}@code{;}@var{dddddddd}@code{;}@var{bbbbbbbb} @strong{(obsolete)}
@tab
! @var{AA} = signal number; @var{tttttttt} = address of symbol "_start";
! @var{dddddddd} = base of data section; @var{bbbbbbbb} = base of bss
! section. @emph{Note: only used by Cisco Systems targets. The difference
! between this reply and the "qOffsets" query is that the 'N' packet may
! arrive spontaneously whereas the 'qOffsets' is a query initiated by the
! host debugger.}
@item @code{O}@var{XX...}
@tab
--- 9396,9409 ----
@tab
The process terminated with signal @var{AA}.
! @item @code{N}@var{AA}@code{;}@var{t...}@code{;}@var{d...}@code{;}@var{b...} @strong{(obsolete)}
@tab
! @var{AA} = signal number; @var{t...} = address of symbol "_start";
! @var{d...} = base of data section; @var{b...} = base of bss section.
! @emph{Note: only used by Cisco Systems targets. The difference between
! this reply and the "qOffsets" query is that the 'N' packet may arrive
! spontaneously whereas the 'qOffsets' is a query initiated by the host
! debugger.}
@item @code{O}@var{XX...}
@tab
*************** Example sequence of a target being stepp
*** 9536,9542 ****
<- @code{+}
@end example
! @node Server, NetWare, Protocol, Remote Serial
@subsubsection Using the @code{gdbserver} program
@kindex gdbserver
--- 9620,9626 ----
<- @code{+}
@end example
! @node Server
@subsubsection Using the @code{gdbserver} program
@kindex gdbserver
*************** text depends on the host system, but whi
*** 9638,9644 ****
@samp{Connection refused}.
@end table
! @node NetWare, , Server, Remote Serial
@subsubsection Using the @code{gdbserve.nlm} program
@kindex gdbserve.nlm
--- 9722,9728 ----
@samp{Connection refused}.
@end table
! @node NetWare
@subsubsection Using the @code{gdbserve.nlm} program
@kindex gdbserve.nlm
*************** argument is a device name (usually a ser
*** 9695,9701 ****
communications with the server via serial line @file{/dev/ttyb}.
@end table
! @node KOD, , Remote, Targets
@section Kernel Object Display
@cindex kernel object display
--- 9779,9785 ----
communications with the server via serial line @file{/dev/ttyb}.
@end table
! @node KOD
@section Kernel Object Display
@cindex kernel object display
*************** There is currently no way to determine w
*** 9734,9740 ****
is supported other than to try it.
! @node Configurations, Controlling GDB, Targets, Top
@chapter Configuration-Specific Information
While nearly all @value{GDBN} commands are available for all native and
--- 9818,9824 ----
is supported other than to try it.
! @node Configurations
@chapter Configuration-Specific Information
While nearly all @value{GDBN} commands are available for all native and
*************** are quite different from each other.
*** 9754,9760 ****
* Architectures::
@end menu
! @node Native, Embedded OS, Configurations, Configurations
@section Native
This section describes details specific to particular native
--- 9838,9844 ----
* Architectures::
@end menu
! @node Native
@section Native
This section describes details specific to particular native
*************** configurations.
*** 9765,9778 ****
* SVR4 Process Information:: SVR4 process information
@end menu
! @node HP-UX, SVR4 Process Information, Native, Native
@subsection HP-UX
On HP-UX systems, if you refer to a function or variable name that
begins with a dollar sign, @value{GDBN} searches for a user or system
name first, before it searches for a convenience variable.
! @node SVR4 Process Information, , HP-UX, Native
@subsection SVR4 process information
@kindex /proc
--- 9849,9862 ----
* SVR4 Process Information:: SVR4 process information
@end menu
! @node HP-UX
@subsection HP-UX
On HP-UX systems, if you refer to a function or variable name that
begins with a dollar sign, @value{GDBN} searches for a user or system
name first, before it searches for a convenience variable.
! @node SVR4 Process Information
@subsection SVR4 process information
@kindex /proc
*************** received.
*** 9817,9823 ****
Show all the above information about the process.
@end table
! @node Embedded OS, Embedded Processors, Native, Configurations
@section Embedded Operating Systems
This section describes configurations involving the debugging of
--- 9901,9907 ----
Show all the above information about the process.
@end table
! @node Embedded OS
@section Embedded Operating Systems
This section describes configurations involving the debugging of
*************** architectures.
*** 9831,9837 ****
@value{GDBN} includes the ability to debug programs running on
various real-time operating systems.
! @node VxWorks, , Embedded OS, Embedded OS
@subsection Using @value{GDBN} with VxWorks
@cindex VxWorks
--- 9915,9921 ----
@value{GDBN} includes the ability to debug programs running on
various real-time operating systems.
! @node VxWorks
@subsection Using @value{GDBN} with VxWorks
@cindex VxWorks
*************** run @value{GDBN}. From your Unix host,
*** 9898,9904 ****
* VxWorks Attach:: Running tasks
@end menu
! @node VxWorks Connection, VxWorks Download, VxWorks, VxWorks
@subsubsection Connecting to VxWorks
The @value{GDBN} command @code{target} lets you connect to a VxWorks target on the
--- 9982,9988 ----
* VxWorks Attach:: Running tasks
@end menu
! @node VxWorks Connection
@subsubsection Connecting to VxWorks
The @value{GDBN} command @code{target} lets you connect to a VxWorks target on the
*************** When this happens, add the appropriate d
*** 9931,9937 ****
the @value{GDBN} command @code{path}, and execute the @code{target}
command again.
! @node VxWorks Download, VxWorks Attach, VxWorks Connection, VxWorks
@subsubsection VxWorks download
@cindex download to VxWorks
--- 10015,10021 ----
the @value{GDBN} command @code{path}, and execute the @code{target}
command again.
! @node VxWorks Download
@subsubsection VxWorks download
@cindex download to VxWorks
*************** history. (This is necessary in order to
*** 9977,9983 ****
debugger's data structures that reference the target system's symbol
table.)
! @node VxWorks Attach, , VxWorks Download, VxWorks
@subsubsection Running tasks
@cindex running VxWorks tasks
--- 10061,10067 ----
debugger's data structures that reference the target system's symbol
table.)
! @node VxWorks Attach
@subsubsection Running tasks
@cindex running VxWorks tasks
*************** where @var{task} is the VxWorks hexadeci
*** 9993,9999 ****
or suspended when you attach to it. Running tasks are suspended at
the time of attachment.
! @node Embedded Processors, Architectures, Embedded OS, Configurations
@section Embedded Processors
This section goes into details specific to particular embedded
--- 10077,10083 ----
or suspended when you attach to it. Running tasks are suspended at
the time of attachment.
! @node Embedded Processors
@section Embedded Processors
This section goes into details specific to particular embedded
*************** configurations.
*** 10018,10024 ****
* Z8000:: Zilog Z8000
@end menu
! @node A29K Embedded, ARM, Embedded Processors, Embedded Processors
@subsection AMD A29K Embedded
@menu
--- 10102,10108 ----
* Z8000:: Zilog Z8000
@end menu
! @node A29K Embedded
@subsection AMD A29K Embedded
@menu
*************** name of the program to be debugged, as i
*** 10046,10052 ****
@end table
! @node A29K UDI, A29K EB29K, A29K Embedded, A29K Embedded
@subsubsection A29K UDI
@cindex UDI
--- 10130,10136 ----
@end table
! @node A29K UDI
@subsubsection A29K UDI
@cindex UDI
*************** working directory, you must set the envi
*** 10070,10076 ****
to its pathname.
@end table
! @node A29K EB29K, Comms (EB29K), A29K UDI, A29K Embedded
@subsubsection EBMON protocol for AMD29K
@cindex EB29K board
--- 10154,10160 ----
to its pathname.
@end table
! @node A29K EB29K
@subsubsection EBMON protocol for AMD29K
@cindex EB29K board
*************** board) and a serial port on the Unix sys
*** 10085,10091 ****
assume you've hooked the cable between the PC's @file{COM1} port and
@file{/dev/ttya} on the Unix system.
! @node Comms (EB29K), gdb-EB29K, A29K EB29K, A29K Embedded
@subsubsection Communications setup
The next step is to set up the PC's port, by doing something like this
--- 10169,10175 ----
assume you've hooked the cable between the PC's @file{COM1} port and
@file{/dev/ttya} on the Unix system.
! @node Comms (EB29K)
@subsubsection Communications setup
The next step is to set up the PC's port, by doing something like this
*************** other way---perhaps floppy-disk transfer
*** 10207,10213 ****
from the Unix system to the PC; @value{GDBN} does @emph{not} download it over the
serial line.
! @node gdb-EB29K, Remote Log, Comms (EB29K), A29K Embedded
@subsubsection EB29K cross-debugging
Finally, @code{cd} to the directory containing an image of your 29K
--- 10291,10297 ----
from the Unix system to the PC; @value{GDBN} does @emph{not} download it over the
serial line.
! @node gdb-EB29K
@subsubsection EB29K cross-debugging
Finally, @code{cd} to the directory containing an image of your 29K
*************** once again, after your @value{GDBN} sess
*** 10251,10257 ****
Type @kbd{CTTY con} to return command input to the main DOS console,
and type @kbd{~.} to leave @code{tip} or @code{cu}.
! @node Remote Log, , gdb-EB29K, A29K Embedded
@subsubsection Remote log
@kindex eb.log
@cindex log file for EB29K
--- 10335,10341 ----
Type @kbd{CTTY con} to return command input to the main DOS console,
and type @kbd{~.} to leave @code{tip} or @code{cu}.
! @node Remote Log
@subsubsection Remote log
@kindex eb.log
@cindex log file for EB29K
*************** of the commands sent to it. Running @sa
*** 10263,10269 ****
another window often helps to understand trouble with @code{EBMON}, or
unexpected events on the PC side of the connection.
! @node ARM, H8/300, A29K Embedded, Embedded Processors
@subsection ARM
@table @code
--- 10347,10353 ----
another window often helps to understand trouble with @code{EBMON}, or
unexpected events on the PC side of the connection.
! @node ARM
@subsection ARM
@table @code
*************** ARM Demon monitor.
*** 10280,10286 ****
@end table
! @node H8/300, H8/500, ARM, Embedded Processors
@subsection Hitachi H8/300
@table @code
--- 10364,10370 ----
@end table
! @node H8/300
@subsection Hitachi H8/300
@table @code
*************** what speed to use over the serial device
*** 10337,10343 ****
* Hitachi Special:: Special @value{GDBN} commands for Hitachi micros.
@end menu
! @node Hitachi Boards, Hitachi ICE, H8/300, H8/300
@subsubsection Connecting to Hitachi boards
@c only for Unix hosts
--- 10421,10427 ----
* Hitachi Special:: Special @value{GDBN} commands for Hitachi micros.
@end menu
! @node Hitachi Boards
@subsubsection Connecting to Hitachi boards
@c only for Unix hosts
*************** to detect program completion.
*** 10450,10456 ****
In either case, @value{GDBN} sees the effect of a @sc{reset} on the
development board as a ``normal exit'' of your program.
! @node Hitachi ICE, Hitachi Special, Hitachi Boards, H8/300
@subsubsection Using the E7000 in-circuit emulator
@kindex target e7000@r{, with Hitachi ICE}
--- 10534,10540 ----
In either case, @value{GDBN} sees the effect of a @sc{reset} on the
development board as a ``normal exit'' of your program.
! @node Hitachi ICE
@subsubsection Using the E7000 in-circuit emulator
@kindex target e7000@r{, with Hitachi ICE}
*************** If your E7000 is installed as a host on
*** 10470,10476 ****
specify its hostname; @value{GDBN} uses @code{telnet} to connect.
@end table
! @node Hitachi Special, , Hitachi ICE, H8/300
@subsubsection Special @value{GDBN} commands for Hitachi micros
Some @value{GDBN} commands are available only for the H8/300:
--- 10554,10560 ----
specify its hostname; @value{GDBN} uses @code{telnet} to connect.
@end table
! @node Hitachi Special
@subsubsection Special @value{GDBN} commands for Hitachi micros
Some @value{GDBN} commands are available only for the H8/300:
*************** to check which variant is currently in e
*** 10487,10493 ****
@end table
! @node H8/500, i960, H8/300, Embedded Processors
@subsection H8/500
@table @code
--- 10571,10577 ----
@end table
! @node H8/500
@subsection H8/500
@table @code
*************** memory}. The accepted values for @var{m
*** 10503,10509 ****
@end table
! @node i960, M32R/D, H8/500, Embedded Processors
@subsection Intel i960
@table @code
--- 10587,10593 ----
@end table
! @node i960
@subsection Intel i960
@table @code
*************** downloads @var{filename} to the 960 as w
*** 10556,10562 ****
* Nindy Reset:: Nindy reset command
@end menu
! @node Nindy Startup, Nindy Options, i960, i960
@subsubsection Startup with Nindy
If you simply start @code{@value{GDBP}} without using any command-line
--- 10640,10646 ----
* Nindy Reset:: Nindy reset command
@end menu
! @node Nindy Startup
@subsubsection Startup with Nindy
If you simply start @code{@value{GDBP}} without using any command-line
*************** simply start up with no Nindy connection
*** 10574,10580 ****
with an empty line. If you do this and later wish to attach to Nindy,
use @code{target} (@pxref{Target Commands, ,Commands for managing targets}).
! @node Nindy Options, Nindy Reset, Nindy Startup, i960
@subsubsection Options for Nindy
These are the startup options for beginning your @value{GDBN} session with a
--- 10658,10664 ----
with an empty line. If you do this and later wish to attach to Nindy,
use @code{target} (@pxref{Target Commands, ,Commands for managing targets}).
! @node Nindy Options
@subsubsection Options for Nindy
These are the startup options for beginning your @value{GDBN} session with a
*************** The standard @samp{-b} option controls t
*** 10617,10623 ****
port.
@c @group
! @node Nindy Reset, , Nindy Options, i960
@subsubsection Nindy reset command
@table @code
--- 10701,10707 ----
port.
@c @group
! @node Nindy Reset
@subsubsection Nindy reset command
@table @code
*************** a break is detected.
*** 10630,10636 ****
@end table
@c @end group
! @node M32R/D, M68K, i960, Embedded Processors
@subsection Mitsubishi M32R/D
@table @code
--- 10714,10720 ----
@end table
@c @end group
! @node M32R/D
@subsection Mitsubishi M32R/D
@table @code
*************** Mitsubishi M32R/D ROM monitor.
*** 10641,10647 ****
@end table
! @node M68K, M88K, M32R/D, Embedded Processors
@subsection M68k
The Motorola m68k configuration includes ColdFire support, and
--- 10725,10731 ----
@end table
! @node M68K
@subsection M68k
The Motorola m68k configuration includes ColdFire support, and
*************** ROMBUG ROM monitor for OS/9000.
*** 10692,10698 ****
@end table
! @node M88K, MIPS Embedded, M68K, Embedded Processors
@subsection M88K
@table @code
--- 10776,10782 ----
@end table
! @node M88K
@subsection M88K
@table @code
*************** BUG monitor, running on a MVME187 (m88k)
*** 10703,10709 ****
@end table
! @node MIPS Embedded, PowerPC, M88K, Embedded Processors
@subsection MIPS Embedded
@cindex MIPS boards
--- 10787,10793 ----
@end table
! @node MIPS Embedded
@subsection MIPS Embedded
@cindex MIPS boards
*************** forever because it has no way of knowing
*** 10847,10853 ****
to run before stopping.
@end table
! @node PowerPC, PA, MIPS Embedded, Embedded Processors
@subsection PowerPC
@table @code
--- 10931,10937 ----
to run before stopping.
@end table
! @node PowerPC
@subsection PowerPC
@table @code
*************** SDS monitor, running on a PowerPC board
*** 10868,10874 ****
@end table
! @node PA, SH, PowerPC, Embedded Processors
@subsection HP PA Embedded
@table @code
--- 10952,10958 ----
@end table
! @node PA
@subsection HP PA Embedded
@table @code
*************** W89K monitor, running on a Winbond HPPA
*** 10883,10889 ****
@end table
! @node SH, Sparclet, PA, Embedded Processors
@subsection Hitachi SH
@table @code
--- 10967,10973 ----
@end table
! @node SH
@subsection Hitachi SH
@table @code
*************** Hitachi SH-3 and SH-3E target systems.
*** 10906,10912 ****
@end table
! @node Sparclet, Sparclite, SH, Embedded Processors
@subsection Tsqware Sparclet
@cindex Sparclet
--- 10990,10996 ----
@end table
! @node Sparclet
@subsection Tsqware Sparclet
@cindex Sparclet
*************** run @value{GDBN}. From your Unix host,
*** 10960,10966 ****
* Sparclet Execution:: Running and debugging
@end menu
! @node Sparclet File, Sparclet Connection, Sparclet, Sparclet
@subsubsection Setting file to debug
The @value{GDBN} command @code{file} lets you choose with program to debug.
--- 11044,11050 ----
* Sparclet Execution:: Running and debugging
@end menu
! @node Sparclet File
@subsubsection Setting file to debug
The @value{GDBN} command @code{file} lets you choose with program to debug.
*************** When this happens, add the appropriate d
*** 10990,10996 ****
the @value{GDBN} commands @code{path} and @code{dir}, and execute the
@code{target} command again.
! @node Sparclet Connection, Sparclet Download, Sparclet File, Sparclet
@subsubsection Connecting to Sparclet
The @value{GDBN} command @code{target} lets you connect to a Sparclet target.
--- 11074,11080 ----
the @value{GDBN} commands @code{path} and @code{dir}, and execute the
@code{target} command again.
! @node Sparclet Connection
@subsubsection Connecting to Sparclet
The @value{GDBN} command @code{target} lets you connect to a Sparclet target.
*************** main () at ../prog.c:3
*** 11009,11015 ****
Connected to ttya.
@end example
! @node Sparclet Download, Sparclet Execution, Sparclet Connection, Sparclet
@subsubsection Sparclet download
@cindex download to Sparclet
--- 11093,11099 ----
Connected to ttya.
@end example
! @node Sparclet Download
@subsubsection Sparclet download
@cindex download to Sparclet
*************** If the code is loaded at a different add
*** 11035,11041 ****
to, you may need to use the @code{section} and @code{add-symbol-file} commands
to tell @value{GDBN} where to map the symbol table.
! @node Sparclet Execution, , Sparclet Download, Sparclet
@subsubsection Running and debugging
@cindex running and debugging Sparclet programs
--- 11119,11125 ----
to, you may need to use the @code{section} and @code{add-symbol-file} commands
to tell @value{GDBN} where to map the symbol table.
! @node Sparclet Execution
@subsubsection Running and debugging
@cindex running and debugging Sparclet programs
*************** Breakpoint 1, main (argc=1, argv=0xeffff
*** 11055,11061 ****
(gdbslet)
@end example
! @node Sparclite, ST2000, Sparclet, Embedded Processors
@subsection Fujitsu Sparclite
@table @code
--- 11139,11145 ----
(gdbslet)
@end example
! @node Sparclite
@subsection Fujitsu Sparclite
@table @code
*************** remote protocol.
*** 11069,11075 ****
@end table
! @node ST2000, Z8000, Sparclite, Embedded Processors
@subsection Tandem ST2000
@value{GDBN} may be used with a Tandem ST2000 phone switch, running Tandem's
--- 11153,11159 ----
@end table
! @node ST2000
@subsection Tandem ST2000
@value{GDBN} may be used with a Tandem ST2000 phone switch, running Tandem's
*************** sequences gets you back to the @value{GD
*** 11118,11124 ****
@kbd{@key{RET}~@key{C-d}} (Return, followed by tilde and control-D).
@end table
! @node Z8000, , ST2000, Embedded Processors
@subsection Zilog Z8000
@cindex Z8000
--- 11202,11208 ----
@kbd{@key{RET}~@key{C-d}} (Return, followed by tilde and control-D).
@end table
! @node Z8000
@subsection Zilog Z8000
@cindex Z8000
*************** conventions; for example, @w{@samp{b fpu
*** 11169,11175 ****
conditional breakpoint that suspends only after at least 5000
simulated clock ticks.
! @node Architectures, , Embedded Processors, Configurations
@section Architectures
This section describes characteristics of architectures that affect
--- 11253,11259 ----
conditional breakpoint that suspends only after at least 5000
simulated clock ticks.
! @node Architectures
@section Architectures
This section describes characteristics of architectures that affect
*************** all uses of @value{GDBN} with the archit
*** 11181,11187 ****
* MIPS::
@end menu
! @node A29K, Alpha, Architectures, Architectures
@subsection A29K
@table @code
--- 11265,11271 ----
* MIPS::
@end menu
! @node A29K
@subsection A29K
@table @code
*************** processors.
*** 11207,11218 ****
@end table
! @node Alpha, MIPS, A29K, Architectures
@subsection Alpha
See the following section.
! @node MIPS, , Alpha, Architectures
@subsection MIPS
@cindex stack on Alpha
--- 11291,11302 ----
@end table
! @node Alpha
@subsection Alpha
See the following section.
! @node MIPS
@subsection MIPS
@cindex stack on Alpha
*************** These commands are available @emph{only}
*** 11247,11253 ****
for debugging programs on Alpha or MIPS processors.
! @node Controlling GDB, Sequences, Configurations, Top
@chapter Controlling @value{GDBN}
You can alter the way @value{GDBN} interacts with you by using the
--- 11331,11337 ----
for debugging programs on Alpha or MIPS processors.
! @node Controlling GDB
@chapter Controlling @value{GDBN}
You can alter the way @value{GDBN} interacts with you by using the
*************** described here.
*** 11265,11271 ****
* Debugging Output:: Optional messages about internal happenings
@end menu
! @node Prompt, Editing, Controlling GDB, Controlling GDB
@section Prompt
@cindex prompt
--- 11349,11355 ----
* Debugging Output:: Optional messages about internal happenings
@end menu
! @node Prompt
@section Prompt
@cindex prompt
*************** Directs @value{GDBN} to use @var{newprom
*** 11291,11297 ****
Prints a line of the form: @samp{Gdb's prompt is: @var{your-prompt}}
@end table
! @node Editing, History, Prompt, Controlling GDB
@section Command editing
@cindex readline
@cindex command line editing
--- 11375,11381 ----
Prints a line of the form: @samp{Gdb's prompt is: @var{your-prompt}}
@end table
! @node Editing
@section Command editing
@cindex readline
@cindex command line editing
*************** Disable command line editing.
*** 11321,11327 ****
Show whether command line editing is enabled.
@end table
! @node History, Screen Size, Editing, Controlling GDB
@section Command history
@value{GDBN} can keep track of the commands you type during your
--- 11405,11411 ----
Show whether command line editing is enabled.
@end table
! @node History
@section Command history
@value{GDBN} can keep track of the commands you type during your
*************** Print ten commands centered on command n
*** 11418,11424 ****
Print ten commands just after the commands last printed.
@end table
! @node Screen Size, Numbers, History, Controlling GDB
@section Screen size
@cindex size of screen
@cindex pauses in output
--- 11502,11508 ----
Print ten commands just after the commands last printed.
@end table
! @node Screen Size
@section Screen size
@cindex size of screen
@cindex pauses in output
*************** Likewise, you can specify @samp{set widt
*** 11460,11466 ****
from wrapping its output.
@end table
! @node Numbers, Messages/Warnings, Screen Size, Controlling GDB
@section Numbers
@cindex number representation
@cindex entering numbers
--- 11544,11550 ----
from wrapping its output.
@end table
! @node Numbers
@section Numbers
@cindex number representation
@cindex entering numbers
*************** Display the current default base for num
*** 11507,11513 ****
Display the current default base for numeric display.
@end table
! @node Messages/Warnings, Debugging Output , Numbers, Controlling GDB
@section Optional warnings and messages
By default, @value{GDBN} is silent about its inner workings. If you are
--- 11591,11597 ----
Display the current default base for numeric display.
@end table
! @node Messages/Warnings
@section Optional warnings and messages
By default, @value{GDBN} is silent about its inner workings. If you are
*************** Displays state of confirmation requests.
*** 11583,11589 ****
@end table
! @node Debugging Output, ,Messages/Warnings, Controlling GDB
@section Optional messages about internal happenings
@table @code
@kindex set debug arch
--- 11667,11673 ----
@end table
! @node Debugging Output
@section Optional messages about internal happenings
@table @code
@kindex set debug arch
*************** Displays the current state of displaying
*** 11654,11660 ****
debugging info.
@end table
! @node Sequences, Emacs, Controlling GDB, Top
@chapter Canned Sequences of Commands
Aside from breakpoint commands (@pxref{Break Commands, ,Breakpoint
--- 11738,11744 ----
debugging info.
@end table
! @node Sequences
@chapter Canned Sequences of Commands
Aside from breakpoint commands (@pxref{Break Commands, ,Breakpoint
*************** files.
*** 11669,11675 ****
* Output:: Commands for controlled output
@end menu
! @node Define, Hooks, Sequences, Sequences
@section User-defined commands
@cindex user-defined command
--- 11753,11759 ----
* Output:: Commands for controlled output
@end menu
! @node Define
@section User-defined commands
@cindex user-defined command
*************** without asking when used inside a user-d
*** 11762,11768 ****
commands that normally print messages to say what they are doing omit the
messages when used in a user-defined command.
! @node Hooks, Command Files, Define, Sequences
@section User-defined command hooks
@cindex command hooks
@cindex hooks, for commands
--- 11846,11852 ----
commands that normally print messages to say what they are doing omit the
messages when used in a user-defined command.
! @node Hooks
@section User-defined command hooks
@cindex command hooks
@cindex hooks, for commands
*************** If an error occurs during the execution
*** 11808,11814 ****
If you try to define a hook which does not match any known command, you
get a warning from the @code{define} command.
! @node Command Files, Output, Hooks, Sequences
@section Command files
@cindex command files
--- 11892,11898 ----
If you try to define a hook which does not match any known command, you
get a warning from the @code{define} command.
! @node Command Files
@section Command files
@cindex command files
*************** without asking when used in a command fi
*** 11871,11877 ****
normally print messages to say what they are doing omit the messages
when called from command files.
! @node Output, , Command Files, Sequences
@section Commands for controlled output
During the execution of a command file or a user-defined command, normal
--- 11955,11961 ----
normally print messages to say what they are doing omit the messages
when called from command files.
! @node Output
@section Commands for controlled output
During the execution of a command file or a user-defined command, normal
*************** string are the simple ones that consist
*** 11951,11957 ****
letter.
@end table
! @node Emacs, Annotations, Sequences, Top
@chapter Using @value{GDBN} under @sc{gnu} Emacs
@cindex Emacs
--- 12035,12041 ----
letter.
@end table
! @node Emacs
@chapter Using @value{GDBN} under @sc{gnu} Emacs
@cindex Emacs
*************** environment. Users of this environment
*** 12125,12135 ****
each value is printed in its own window.
@end ignore
! @node Annotations, GDB Bugs, Emacs, Top
@chapter @value{GDBN} Annotations
@include annotate.texi
! @node GDB Bugs, Command Line Editing, Annotations, Top
@chapter Reporting Bugs in @value{GDBN}
@cindex bugs in @value{GDBN}
@cindex reporting bugs in @value{GDBN}
--- 12209,12219 ----
each value is printed in its own window.
@end ignore
! @node Annotations
@chapter @value{GDBN} Annotations
@include annotate.texi
! @node GDB Bugs
@chapter Reporting Bugs in @value{GDBN}
@cindex bugs in @value{GDBN}
@cindex reporting bugs in @value{GDBN}
*************** information that enables us to fix the b
*** 12149,12155 ****
* Bug Reporting:: How to report bugs
@end menu
! @node Bug Criteria, Bug Reporting, GDB Bugs, GDB Bugs
@section Have you found a bug?
@cindex bug criteria
--- 12233,12239 ----
* Bug Reporting:: How to report bugs
@end menu
! @node Bug Criteria
@section Have you found a bug?
@cindex bug criteria
*************** If you are an experienced user of debugg
*** 12181,12187 ****
for improvement of @value{GDBN} are welcome in any case.
@end itemize
! @node Bug Reporting, , Bug Criteria, GDB Bugs
@section How to report bugs
@cindex bug reports
@cindex @value{GDBN} bugs, reporting
--- 12265,12271 ----
for improvement of @value{GDBN} are welcome in any case.
@end itemize
! @node Bug Reporting
@section How to report bugs
@cindex bug reports
@cindex @value{GDBN} bugs, reporting
*************** things without first using the debugger
*** 12371,12387 ****
@c Use -I with makeinfo to point to the appropriate directory,
@c environment var TEXINPUTS with TeX.
! @node Command Line Editing, Using History Interactively, GDB Bugs, Top
@chapter Command Line Editing
@include rluser.texinfo
! @node Using History Interactively, Formatting Documentation, Command Line Editing, Top
@chapter Using History Interactively
@include inc-hist.texinfo
! @node Formatting Documentation, Installing GDB, Using History Interactively, Top
@appendix Formatting Documentation
@cindex @value{GDBN} reference card
--- 12455,12471 ----
@c Use -I with makeinfo to point to the appropriate directory,
@c environment var TEXINPUTS with TeX.
! @node Command Line Editing
@chapter Command Line Editing
@include rluser.texinfo
! @node Using History Interactively
@chapter Using History Interactively
@include inc-hist.texinfo
! @node Formatting Documentation
@appendix Formatting Documentation
@cindex @value{GDBN} reference card
*************** make gdb.dvi
*** 12467,12473 ****
Then give @file{gdb.dvi} to your @sc{dvi} printing program.
! @node Installing GDB, Index, Formatting Documentation, Top
@appendix Installing @value{GDBN}
@cindex configuring @value{GDBN}
@cindex installation
--- 12551,12557 ----
Then give @file{gdb.dvi} to your @sc{dvi} printing program.
! @node Installing GDB
@appendix Installing @value{GDBN}
@cindex configuring @value{GDBN}
@cindex installation
*************** let @value{GDBN} debug child processes w
*** 12587,12593 ****
* Configure Options:: Summary of options for configure
@end menu
! @node Separate Objdir, Config Names, Installing GDB, Installing GDB
@section Compiling @value{GDBN} in another directory
If you want to run @value{GDBN} versions for several host or target machines,
--- 12671,12677 ----
* Configure Options:: Summary of options for configure
@end menu
! @node Separate Objdir
@section Compiling @value{GDBN} in another directory
If you want to run @value{GDBN} versions for several host or target machines,
*************** directories, you can run @code{make} on
*** 12648,12654 ****
if they are NFS-mounted on each of the hosts); they will not interfere
with each other.
! @node Config Names, Configure Options, Separate Objdir, Installing GDB
@section Specifying names for hosts and targets
The specifications used for hosts and targets in the @code{configure}
--- 12732,12738 ----
if they are NFS-mounted on each of the hosts); they will not interfere
with each other.
! @node Config Names
@section Specifying names for hosts and targets
The specifications used for hosts and targets in the @code{configure}
*************** Invalid configuration `i986v': machine `
*** 12690,12696 ****
@code{config.sub} is also distributed in the @value{GDBN} source
directory (@file{gdb-@value{GDBVN}}, for version @value{GDBVN}).
! @node Configure Options, , Config Names, Installing GDB
@section @code{configure} options
Here is a summary of the @code{configure} options and arguments that
--- 12774,12780 ----
@code{config.sub} is also distributed in the @value{GDBN} source
directory (@file{gdb-@value{GDBVN}}, for version @value{GDBVN}).
! @node Configure Options
@section @code{configure} options
Here is a summary of the @code{configure} options and arguments that
*************** There is no convenient way to generate a
*** 12759,12765 ****
There are many other options available as well, but they are generally
needed for special purposes only.
! @node Index, , Installing GDB, Top
@unnumbered Index
@printindex cp
--- 12843,12849 ----
There are many other options available as well, but they are generally
needed for special purposes only.
! @node Index
@unnumbered Index
@printindex cp
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: PATCH: thread.c syntax fix
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <86ggab$nal$1@cronkite.cygnus.com>
References: <20000123152735.A7047@rjlhome.sco.com>
X-SW-Source: 2000-q1/msg00028.html
Content-length: 655
In article < 20000123152735.A7047@rjlhome.sco.com >,
Robert Lipe <robertl@sco.com> wrote:
>If a fn isn't proto'ed before it's seen it's assumed to return an
>int. Some compilers will issue diagnostics about the function type
>redeclaration.
>
>2000-01-23 Robert Lipe (robertl@sco.com)
>
> * thread.c (gdb_thread_select): Make static. Add prototype
> before first use.
Thanks for tracking this down. It looks like gdb_thread_select should
still be defined as a global to accomodate some not-ready-for-release
code dealing with threads.
So, I've added the declaration to a header file.
--
cgf@redhat.com
http://www.redhat.com/
From kingdon@redhat.com Sat Apr 01 00:00:00 2000
From: Jim Kingdon <kingdon@redhat.com>
To: gdb-patches@sourceware.cygnus.com
Subject: Testsuite cleanup in gdb.c++/annota2.exp
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <200001020459.XAA30900@devserv.devel.redhat.com>
X-SW-Source: 2000-q1/msg00000.html
Content-length: 1024
In the process of investigating some other failures, I found some
fragile code in gdb.c++/annota2.exp (I can explain at greater length
if the problem I'm fixing isn't obvious):
2000-01-01 Jim Kingdon < http://developer.redhat.com/ >
* gdb.c++/annota2.exp: Fix "delete bps" test to wait for the
prompt (cleanup rather than necessity, but still might keep output
from spilling to next test).
Index: gdb.c++/annota2.exp
===================================================================
RCS file: /cvs/gdb/gdb/gdb/testsuite/gdb.c++/annota2.exp,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 annota2.exp
--- annota2.exp 1999/09/09 00:00:26 1.1.1.3
+++ annota2.exp 2000/01/02 04:45:30
@@ -139,7 +139,7 @@
-re ".*Delete all breakpoints. \\(y or n\\) \r\n\032\032query.*$" {
send_gdb "y\n"
gdb_expect {
- -re " " { pass "delete bps" }
+ -re " .*$gdb_prompt$" { pass "delete bps" }
-re ".*$gdb_prompt$" { fail "delete bps" }
timeout { fail "delete bps (timeout)" }
}
From scottb@netwinder.org Sat Apr 01 00:00:00 2000
From: Scott Bambrough <scottb@netwinder.org>
To: GDB Patches Mail List <gdb-patches@sourceware.cygnus.com>
Subject: Patch to arm-linux-nat.c...
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <38BAD68A.57FFF476@netwinder.org>
X-SW-Source: 2000-q1/msg00401.html
Content-type: multipart/mixed; boundary="----------=_1583534363-29877-28"
This is a multi-part message in MIME format...
------------=_1583534363-29877-28
Content-length: 760
Hi guys,
I've checked the following patch to arm-linux-nat.c in. This just cleans up
some build warnings and naming of functions.
2000-02-28 Scott Bambrough <scottb@netwinder.org>
* arm-linux-nat.c (fetch_nw_fpe_*):
Renamed to fetch_nwfpe_* to use the same naming convention
as in the Linux kernel. Modified prototype to get rid of
unused parameters.
(store_nw_fpe_*): Renamed to store_nwfpe_* to use the same
naming convention as in the Linux kernel. Fixed calls to
fetch_nwfpe_*.
(store_fpregs): Fixed calls to store_nwfpe_*. Removed
unused variable.
--
Scott Bambrough - Software Engineer
REBEL.COM http://www.rebel.com
NetWinder http://www.netwinder.org
alnat.diff
------------=_1583534363-29877-28
Content-Type: text/x-diff; charset=us-ascii; name="alnat.diff"
Content-Disposition: inline; filename="alnat.diff"
Content-Transfer-Encoding: base64
Content-Length: 4165
SW5kZXg6IGFybS1saW51eC1uYXQuYw0KPT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PQ0KUkNTIGZpbGU6IC9jdnMvc3JjL3NyYy9nZGIvYXJtLWxpbnV4LW5hdC5j
LHYNCnJldHJpZXZpbmcgcmV2aXNpb24gMS4xLjEuMQ0KZGlmZiAtdSAtcCAt
cjEuMS4xLjEgYXJtLWxpbnV4LW5hdC5jDQotLS0gYXJtLWxpbnV4LW5hdC5j
CTE5OTkvMTIvMjIgMjE6NDU6MDMJMS4xLjEuMQ0KKysrIGFybS1saW51eC1u
YXQuYwkyMDAwLzAyLzI4IDE5OjQ3OjUxDQpAQCAtNzIsNyArNzIsNyBAQCBG
UEExMTsNCiBzdGF0aWMgdW5zaWduZWQgaW50IG9zX3ZlcnNpb24sIG9zX21h
am9yLCBvc19taW5vciwgb3NfcmVsZWFzZTsNCiANCiBzdGF0aWMgdm9pZA0K
LWZldGNoX253X2ZwZV9zaW5nbGUgKHVuc2lnbmVkIGludCBmbiwgRlBBMTEg
KiBmcGExMSwgdW5zaWduZWQgaW50ICpwbWVtKQ0KK2ZldGNoX253ZnBlX3Np
bmdsZSAodW5zaWduZWQgaW50IGZuLCBGUEExMSAqIGZwYTExKQ0KIHsNCiAg
IHVuc2lnbmVkIGludCBtZW1bM107DQogDQpAQCAtODMsNyArODMsNyBAQCBm
ZXRjaF9ud19mcGVfc2luZ2xlICh1bnNpZ25lZCBpbnQgZm4sIEZQDQogfQ0K
IA0KIHN0YXRpYyB2b2lkDQotZmV0Y2hfbndfZnBlX2RvdWJsZSAodW5zaWdu
ZWQgaW50IGZuLCBGUEExMSAqIGZwYTExLCB1bnNpZ25lZCBpbnQgKnBtZW0p
DQorZmV0Y2hfbndmcGVfZG91YmxlICh1bnNpZ25lZCBpbnQgZm4sIEZQQTEx
ICogZnBhMTEpDQogew0KICAgdW5zaWduZWQgaW50IG1lbVszXTsNCiANCkBA
IC05NCw3ICs5NCw3IEBAIGZldGNoX253X2ZwZV9kb3VibGUgKHVuc2lnbmVk
IGludCBmbiwgRlANCiB9DQogDQogc3RhdGljIHZvaWQNCi1mZXRjaF9ud19m
cGVfbm9uZSAodW5zaWduZWQgaW50IGZuLCBGUEExMSAqIGZwYTExLCB1bnNp
Z25lZCBpbnQgKnBtZW0pDQorZmV0Y2hfbndmcGVfbm9uZSAodW5zaWduZWQg
aW50IGZuKQ0KIHsNCiAgIHVuc2lnbmVkIGludCBtZW1bM10gPQ0KICAgezAs
IDAsIDB9Ow0KQEAgLTEwMyw3ICsxMDMsNyBAQCBmZXRjaF9ud19mcGVfbm9u
ZSAodW5zaWduZWQgaW50IGZuLCBGUEExDQogfQ0KIA0KIHN0YXRpYyB2b2lk
DQotZmV0Y2hfbndfZnBlX2V4dGVuZGVkICh1bnNpZ25lZCBpbnQgZm4sIEZQ
QTExICogZnBhMTEsIHVuc2lnbmVkIGludCAqcG1lbSkNCitmZXRjaF9ud2Zw
ZV9leHRlbmRlZCAodW5zaWduZWQgaW50IGZuLCBGUEExMSAqIGZwYTExKQ0K
IHsNCiAgIHVuc2lnbmVkIGludCBtZW1bM107DQogDQpAQCAtMTE0LDcgKzEx
NCw3IEBAIGZldGNoX253X2ZwZV9leHRlbmRlZCAodW5zaWduZWQgaW50IGZu
LCANCiB9DQogDQogc3RhdGljIHZvaWQNCi1zdG9yZV9ud19mcGVfc2luZ2xl
ICh1bnNpZ25lZCBpbnQgZm4sIEZQQTExICogZnBhMTEpDQorc3RvcmVfbndm
cGVfc2luZ2xlICh1bnNpZ25lZCBpbnQgZm4sIEZQQTExICogZnBhMTEpDQog
ew0KICAgdW5zaWduZWQgaW50IG1lbVszXTsNCiANCkBAIC0xMjQsNyArMTI0
LDcgQEAgc3RvcmVfbndfZnBlX3NpbmdsZSAodW5zaWduZWQgaW50IGZuLCBG
UA0KIH0NCiANCiBzdGF0aWMgdm9pZA0KLXN0b3JlX253X2ZwZV9kb3VibGUg
KHVuc2lnbmVkIGludCBmbiwgRlBBMTEgKiBmcGExMSkNCitzdG9yZV9ud2Zw
ZV9kb3VibGUgKHVuc2lnbmVkIGludCBmbiwgRlBBMTEgKiBmcGExMSkNCiB7
DQogICB1bnNpZ25lZCBpbnQgbWVtWzNdOw0KIA0KQEAgLTEzNSw3ICsxMzUs
NyBAQCBzdG9yZV9ud19mcGVfZG91YmxlICh1bnNpZ25lZCBpbnQgZm4sIEZQ
DQogfQ0KIA0KIHZvaWQNCi1zdG9yZV9ud19mcGVfZXh0ZW5kZWQgKHVuc2ln
bmVkIGludCBmbiwgRlBBMTEgKiBmcGExMSkNCitzdG9yZV9ud2ZwZV9leHRl
bmRlZCAodW5zaWduZWQgaW50IGZuLCBGUEExMSAqIGZwYTExKQ0KIHsNCiAg
IHVuc2lnbmVkIGludCBtZW1bM107DQogDQpAQCAtMTc1LDE5ICsxNzUsMTkg
QEAgZmV0Y2hfZnByZWdzICh2b2lkKQ0KICAgICAgIHN3aXRjaCAoZnAuZlR5
cGVbZm5dKQ0KIAl7DQogCWNhc2UgdHlwZVNpbmdsZToNCi0JICBmZXRjaF9u
d19mcGVfc2luZ2xlIChmbiwgJmZwLCBwKTsNCisJICBmZXRjaF9ud2ZwZV9z
aW5nbGUgKGZuLCAmZnApOw0KIAkgIGJyZWFrOw0KIA0KIAljYXNlIHR5cGVE
b3VibGU6DQotCSAgZmV0Y2hfbndfZnBlX2RvdWJsZSAoZm4sICZmcCwgcCk7
DQorCSAgZmV0Y2hfbndmcGVfZG91YmxlIChmbiwgJmZwKTsNCiAJICBicmVh
azsNCiANCiAJY2FzZSB0eXBlRXh0ZW5kZWQ6DQotCSAgZmV0Y2hfbndfZnBl
X2V4dGVuZGVkIChmbiwgJmZwLCBwKTsNCisJICBmZXRjaF9ud2ZwZV9leHRl
bmRlZCAoZm4sICZmcCk7DQogCSAgYnJlYWs7DQogDQogCWRlZmF1bHQ6DQot
CSAgZmV0Y2hfbndfZnBlX25vbmUgKGZuLCAmZnAsIHApOw0KKwkgIGZldGNo
X253ZnBlX25vbmUgKGZuKTsNCiAJfQ0KICAgICB9DQogfQ0KQEAgLTE5OSw3
ICsxOTksNiBAQCBzdGF0aWMgdm9pZA0KIHN0b3JlX2ZwcmVncyAodm9pZCkN
CiB7DQogICBpbnQgcmV0LCByZWdubzsNCi0gIHVuc2lnbmVkIGludCBtZW1b
M107DQogICBGUEExMSBmcDsNCiANCiAgIC8qIFN0b3JlIGZwc3IuICAqLw0K
QEAgLTIxNSwxNSArMjE0LDE1IEBAIHN0b3JlX2ZwcmVncyAodm9pZCkNCiAJ
ICBzd2l0Y2ggKGZwLmZUeXBlW2ZuXSkNCiAJICAgIHsNCiAJICAgIGNhc2Ug
dHlwZVNpbmdsZToNCi0JICAgICAgc3RvcmVfbndfZnBlX3NpbmdsZSAoZm4s
ICZmcCk7DQorCSAgICAgIHN0b3JlX253ZnBlX3NpbmdsZSAoZm4sICZmcCk7
DQogCSAgICAgIGJyZWFrOw0KIA0KIAkgICAgY2FzZSB0eXBlRG91YmxlOg0K
LQkgICAgICBzdG9yZV9ud19mcGVfZG91YmxlIChmbiwgJmZwKTsNCisJICAg
ICAgc3RvcmVfbndmcGVfZG91YmxlIChmbiwgJmZwKTsNCiAJICAgICAgYnJl
YWs7DQogDQogCSAgICBjYXNlIHR5cGVFeHRlbmRlZDoNCi0JICAgICAgc3Rv
cmVfbndfZnBlX2V4dGVuZGVkIChmbiwgJmZwKTsNCisJICAgICAgc3RvcmVf
bndmcGVfZXh0ZW5kZWQgKGZuLCAmZnApOw0KIAkgICAgICBicmVhazsNCiAJ
ICAgIH0NCiAJfQ0K
------------=_1583534363-29877-28--
From sbjohnson@ozemail.com.au Sat Apr 01 00:00:00 2000
From: Steven Johnson <sbjohnson@ozemail.com.au>
To: Andrew Cagney <ac131313@cygnus.com>, GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: Re: RFA: Deprecate remote protocol sequence-ID
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <38DE8CA2.A5A862D6@ozemail.com.au>
References: <38DAF122.3CA0E862@cygnus.com> <38DB0EE5.831CD611@ozemail.com.au> <38DB24AB.7881FFA1@cygnus.com> <5mhfdwvxcu.fsf@jtc.redbacknetworks.com> <38DC645E.A6CCB479@cygnus.com>
X-SW-Source: 2000-q1/msg01038.html
Content-length: 683
Andrew Cagney wrote:
>
> "J.T. Conklin" wrote:
> >
> > >>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
> > Andrew> I think a simple reliable separate transport layer is needed. I'd even
> > Andrew> go as far as a new packet wrapper (replacing $...#NN and +-).
> >
> > Here, here!
>
>
> I have a another theory. If we:
>
> o deprecate ``:'' sequence IDs
>
> o introduce a transport
> protocol that works
>
> o ban the transport of new/improved
> packets using the old/broken
> transport protocol.
>
> then there aren't any problems.
>
> Andrew
Its got my vote.
From nsd@cygnus.com Sat Apr 01 00:00:00 2000
From: nsd@cygnus.com
To: ac131313@cygnus.com
Cc: gdb-patches@sourceware.cygnus.com, ezannoni@cygnus.com
Subject: Re: Patch: catch_errors() bug fixes and speedups
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <200002240015.AAA05954@nog.bosbc.com>
References: <38B2FC43.DB202309@cygnus.com>
X-SW-Source: 2000-q1/msg00347.html
Content-length: 138
>> It can certainly go in, unless Andrew has some objections.
Okay, it's in. Thanks, Elena and Andrew, for many helpful comments.
Nick
From rearnsha@arm.com Sat Apr 01 00:00:00 2000
From: Richard Earnshaw <rearnsha@arm.com>
To: gdb-patches@sourceware.cygnus.com
Cc: rearnsha@arm.com
Subject: ARM patch -- extra info about cpsr register
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <200003131918.TAA21085@cam-mail2.cambridge.arm.com>
X-SW-Source: 2000-q1/msg00674.html
Content-length: 632
Time I sorted out some of my local changes...
This patch provides a useful additional decoding of the CPSR register for
ARM ports of GDB for commands such as "info reg". It translates the
setting of the CPSR into a set of mnemonic letters representing the
settings of the various flag bits as documented in the data sheet (upper
case for set bits, lower case for clear bits) -- generally I find this
much more intelligible than the raw numbers.
<date> Richard Earnshaw (rearnsha@arm.com)
* arm-tdep.c (arm_print_register_hook): New function.
* arm/tm-arm.h (PRINT_REGISTER_HOOK): Call it.
(FLAG_*): New bits in CPSR.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: A revised patch for dlclose
[not found] <20000307120800.A27315@valinux.com>
2000-04-01 0:00 ` A new revised patch for dlclose H . J . Lu
@ 2000-04-01 0:00 ` Mark Kettenis
1 sibling, 0 replies; 4+ messages in thread
From: Mark Kettenis @ 2000-04-01 0:00 UTC (permalink / raw)
To: hjl; +Cc: gdb-patches, gdb
Date: Tue, 7 Mar 2000 12:08:00 -0800
From: "H . J . Lu" <hjl@valinux.com>
Here is a revised patch for dlclose. If you take a look at the
dynamic linker in glibc 2.1 or above, you will find that it informs
gdb about loading/unloading a shared library via an internal debug
function, _dl_debug_state (). gdb already handles the loading in
handle_inferior_event () with BPSTAT_WHAT_CHECK_SHLIBS and
BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK. However, we need also
check the unloading event. solib_verify () will be called only when the
dynamic linker calls _dl_debug_state (). It shouldn't introduce any
overhead. I believe it is on the right track although it may be further
optimized.
HJ, please stop wasting your time pushing this patch. The patch has
several bad points, that you cannot fix without considerable changes
to the way solib.c handles and caches the link map.
Mark
From ac131313@cygnus.com Sat Apr 01 00:00:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Jason Molenda <jsm@cygnus.com>
Cc: "J.T. Conklin" <jtc@redback.com>, gdb-patches@sourceware.cygnus.com
Subject: Re: patch: convert gdbserver to autoconf, add netbsd/i386 support
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <38A4FA26.B8C19E9A@cygnus.com>
References: <5mn1p88ma8.fsf@jtc.redbacknetworks.com> <20000210192010.A12329@cygnus.com>
X-SW-Source: 2000-q1/msg00131.html
Content-length: 723
Jason Molenda wrote:
>
> After a brief visual inspection the configury changes look good to me.
> (not that my opinion is the one that counts :-)
>
> On Thu, Feb 10, 2000 at 07:12:47PM -0800, J.T. Conklin wrote:
>
> > I used autoconf 2.12 to generate the gdbserver/configure script. If
> > there's a more official version, feel free to re-generate it.
>
> Submitting auto-generated files like this really isn't necessary
> (it just makes a patch look a whole lot longer than it really is).
> FWIW autoconf 2.13 is the latest released version; it's the one that
> should be used to generate any configure files.
>
> Thanks for the patch, it's one less use of the old Cygnus configure cruft.
Its fine with me.
Andrew
From jtc@redback.com Sat Apr 01 00:00:00 2000
From: jtc@redback.com (J.T. Conklin)
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: RFA: USE_STRUCT_CONVENTION for NetBSD/i386
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <5md7okvwfx.fsf@jtc.redbacknetworks.com>
References: <5msnxieegg.fsf@jtc.redbacknetworks.com> <38DAD990.D91D6D1B@cygnus.com>
X-SW-Source: 2000-q1/msg01005.html
Content-length: 1360
>>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
>> ! int
>> ! i386nbsd_use_struct_convention (int gcc_p, struct type *type)
>> ! {
>> ! return !(TYPE_LENGTH (type) == 1
>> ! || TYPE_LENGTH (type) == 2
>> ! || TYPE_LENGTH (type) == 4
>> ! || TYPE_LENGTH (type) == 8);
>> ! }
>> !
Andrew> I'd add a FIXME pointing out known problems with the function.
Andrew> Otherwize ok.
It's not i386nbsd_use_struct_convention() that needs a FIXME, as it
now properly identifies all functions which return structures via a
hidden pointer vs. those which return structures via registers. It's
i386_extract_return_type() which doesn't know that structures with a
single float or double field are returned in floating point registers.
Andrew> I assume Mark is trying to figure out why NetBSD can't simply
Andrew> use a common i386_use_struct_convention function. I take it
Andrew> from your answer, that NetBSD's convention isn't 100% standard
Andrew> (where standard would mean what someone other than Linux or
Andrew> *BSD did. Solaris/x86?).
I don't think NetBSD does anything non-standard other than defining
DEFAULT_PCC_STRUCT_RETURN to 0 in its gcc config. So this behavior
should be shared among all x86 targets that do the same: cygwin,
freebsd, linux-aout, and mach.
--jtc
--
J.T. Conklin
RedBack Networks
From kingdon@redhat.com Sat Apr 01 00:00:00 2000
From: Jim Kingdon <kingdon@redhat.com>
To: gdb-patches@sourceware.cygnus.com
Subject: "make TAGS" work again after gdbtk reorg
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <200002100240.VAA26815@devserv.devel.redhat.com>
X-SW-Source: 2000-q1/msg00105.html
Content-length: 1186
I needed the following to get "make TAGS" to work (without the change,
it would abort with an error; I don't have gdbtk checked out in case
that is relevant).
2000-02-09 Jim Kingdon <kingdon@redhat.com>
* Makefile.in (SFILES): Remove gdbtk-varobj.c.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.3
diff -u -r1.3 Makefile.in
--- Makefile.in 2000/02/09 08:52:44 1.3
+++ Makefile.in 2000/02/10 00:15:28
@@ -419,6 +419,7 @@
# Links made at configuration time should not be specified here, since
# SFILES is used in building the distribution archive.
+# FIXME: does gdbtk-varobj.c belong here?
SFILES = ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
buildsym.c c-exp.y c-lang.c c-typeprint.c c-valprint.c \
ch-exp.c ch-lang.c ch-typeprint.c ch-valprint.c coffread.c \
@@ -431,7 +432,6 @@
kod.c kod-cisco.c \
ui-out.c cli-out.c \
varobj.c wrapper.c \
- gdbtk-varobj.c \
jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \
m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c main.c maint.c \
mem-break.c minsyms.c mipsread.c nlmread.c objfiles.c parse.c \
From ac131313@cygnus.com Sat Apr 01 00:00:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Mark Kettenis <kettenis@wins.uva.nl>
Cc: eliz@delorie.com, gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH] Some compiler warnings removed
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <38B5F997.EB6593F0@cygnus.com>
References: <200002232235.RAA18817@indy.delorie.com> <38B47B3A.24D778B2@cygnus.com> <200002241107.GAA19384@indy.delorie.com> <200002241133.MAA02461@landau.wins.uva.nl>
X-SW-Source: 2000-q1/msg00366.html
Content-length: 1440
Mark Kettenis wrote:
>
> Date: Thu, 24 Feb 2000 06:07:57 -0500 (EST)
> From: Eli Zaretskii <eliz@delorie.com>
>
> > From: Andrew Cagney <ac131313@cygnus.com>
> >
> > > --- gdb/blockframe.c~0 Wed Dec 22 21:45:02 1999
> > > +++ gdb/blockframe.c Wed Feb 23 16:51:44 2000
> > > @@ -70,6 +70,7 @@ nonnull_frame_chain_valid (chain, thisfr
> > > CORE_ADDR chain;
> > > struct frame_info *thisframe;
> > > {
> > > + thisframe = thisframe;
> > > return ((chain) != 0);
> > > }
> > >
> >
> > FWIW,
> >
> > The way GCC handles this is by appending ATTRIBUTE_UNUSED to the
> > parameter declaratons. I see no reason for doing it differently.
>
> I'm not sure I follow. I know about __attribute__((unused)), but I
> thought I couldn't use GCC-specific extensions, except in places which
> will never be compiled by anything but GCC (like go32-nat.c). If
> there is a portable way of doing this that I missed, please tell me
> where to look.
>
> Take a look at include/ansidecl.h. People who are not using GCC will
> have to learn to live with the warnings :-).
Just an asside. I personally wish that a few of the GCC -W* flags were
tweeked so that they better differentiated between various warnings.
Unused locals vs unused parameters is one example. The random warnings
from -W is another.
Adding ATTRIBUTE_UNUSED is just a compromise.
Andrew
From eliz@delorie.com Sat Apr 01 00:00:00 2000
From: Eli Zaretskii <eliz@delorie.com>
To: ac131313@cygnus.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH] Some compiler warnings removed
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <200002241107.GAA19384@indy.delorie.com>
References: <200002232235.RAA18817@indy.delorie.com> <38B47B3A.24D778B2@cygnus.com>
X-SW-Source: 2000-q1/msg00356.html
Content-length: 1714
> From: Andrew Cagney <ac131313@cygnus.com>
>
> > --- gdb/blockframe.c~0 Wed Dec 22 21:45:02 1999
> > +++ gdb/blockframe.c Wed Feb 23 16:51:44 2000
> > @@ -70,6 +70,7 @@ nonnull_frame_chain_valid (chain, thisfr
> > CORE_ADDR chain;
> > struct frame_info *thisframe;
> > {
> > + thisframe = thisframe;
> > return ((chain) != 0);
> > }
> >
>
> FWIW,
>
> The way GCC handles this is by appending ATTRIBUTE_UNUSED to the
> parameter declaratons. I see no reason for doing it differently.
I'm not sure I follow. I know about __attribute__((unused)), but I
thought I couldn't use GCC-specific extensions, except in places which
will never be compiled by anything but GCC (like go32-nat.c). If
there is a portable way of doing this that I missed, please tell me
where to look.
> > {
> > - /* On AIX and i386 GNU/Linux, floating point values are returned in
> > - floating point registers. */
> > -#if defined(I386_AIX_TARGET) || defined(I386_GNULINUX_TARGET)
> > + /* On AIX, i386 GNU/Linux and DJGPP, floating point values are
> > + returned in floating point registers. */
> > +#if defined(I386_AIX_TARGET) || defined(I386_GNULINUX_TARGET) || defined(I386_DJGPP_TARGET)
> > if (TYPE_CODE_FLT == TYPE_CODE (type))
> > {
> > double d;
> > @@ -720,7 +720,7 @@ i386_extract_return_value (type, regbuf,
> > store_floating (valbuf, TYPE_LENGTH (type), d);
> > }
> > else
> > -#endif /* I386_AIX_TARGET || I386_GNULINUX_TARGET*/
> > +#endif /* I386_AIX_TARGET || I386_GNULINUX_TARGET || I386_DJGPP_TARGET */
>
> This one looks more like an actual code change?
Yes. Sorry, this was intended to be sent with the other batch of
changes I sent yesterday.
From taylor@cygnus.com Sat Apr 01 00:00:00 2000
From: David Taylor <taylor@cygnus.com>
To: Fernando Nasser <fnasser@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: set rewindonsignal
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <200002112015.PAA04866@texas.cygnus.com>
X-SW-Source: 2000-q1/msg00127.html
Content-length: 2022
Date: Thu, 10 Feb 2000 14:16:36 -0500
From: Fernando Nasser <fnasser@cygnus.com>
We have two groups of users who want different behavior of gdb when a
signal is received as a consequence of a "call somefunction()" command.
One wants gdb to return to the state it was before and the other wants
gdb to stay in the stack frame where the signal was received, as this
can be used to debug some situations (note that, depending on the OS and
the context, this can result in a state where execution is not possible
anymore).
The way to get everyone happy is to add a "set rewindonsignal" which, if
"on", will cause the stack to be rewound and the context fully restored
when a signal happens on the inferior call. It does not affect
breakpoints, which do stop in the frame where they occurred (even if
inner than a dummy frame).
The default will be "off", as the original gdb behavior was to stop
inside the frame. I have changed this temporarily in the snapshots due
to a few bugs that we are working on, but as the switch will be
available for those affected (they can add it to their .gdbinit files),
I will revert in time for the next release.
If you think this may have any impact on your work please let me know
(but remember you can set the switch anyway you want).
To me, rewind is something you do to a file or something similar; and
if not otherwise specified, you are rewinding back to the beginning.
When I speak of removing stack frames, I generally speak of unwinding
the stack. If I didn't know that rewindonsignal unwound the stack
back to what it was before the function was called, I wouldn't expect
it to do so.
So, I would prefer that you use some other name for it as I feel that
'rewindonsignal' doesn't imply what it does.
Of course, I'm also in the "leave the stack bloody alone, thank you"
camp. The "if I want the stack unwound, I know how to use the return
command" camp. So, I will likely never set it.
From Peter.Schauer@regent.e-technik.tu-muenchen.de Sat Apr 01 00:00:00 2000
From: "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
To: gdb-patches@sourceware.cygnus.com
Subject: RFD: infrun.c: No bpstat_stop_status call after proceed over break ?
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <200003130948.KAA07547@reisser.regent.e-technik.tu-muenchen.de>
X-SW-Source: 2000-q1/msg00665.html
Content-length: 4730
I am currently trying to fix a GDB bug with missing watchpoint triggers
after proceeding over a breakpoint on x86 targets.
Here is an example, using gdb.c++/annota2:
(gdb) b main
Breakpoint 1 at 0x8048b3a: file annota2.cc, line 21.
(gdb) r
Starting program: annota2
Breakpoint 1, main () at annota2.cc:21
21 a.x = 0;
(gdb) watch a.x
Watchpoint 2: a.x
(gdb) c
Continuing.
Watchpoint 2: a.x
Old value = -536882292
New value = 1
main () at annota2.cc:23
23 a.y = 2;
(gdb)
The breakpoint at main is at the instruction which should cause the
watchpoint trigger (a.x = 0).
When continuing over the breakpoint, breakpoints are removed and the target
is single stepped with trap_expected set to one.
After the step GDB does not reexamine the stop reason, missing the watchpoint
trigger at a.x = 0 and stops too late at the second watchpoint trigger.
Here is the relevant code from handle_inferior_event:
/* Don't even think about breakpoints
if just proceeded over a breakpoint.
However, if we are trying to proceed over a breakpoint
and end up in sigtramp, then through_sigtramp_breakpoint
will be set and we should check whether we've hit the
step breakpoint. */
if (stop_signal == TARGET_SIGNAL_TRAP && trap_expected
&& through_sigtramp_breakpoint == NULL)
bpstat_clear (&stop_bpstat);
else
{
/* See if there is a breakpoint at the current PC. */
stop_bpstat = bpstat_stop_status
(&stop_pc,
.
.
I currently have no idea why we need to special case the proceed over
a breakpoint here, perhaps it is some historic remnant (although I do have
this nagging feeling that I might miss something obvious).
The patch below would get rid of the special case and fix the problem, it
causes no testsuite regressions. Note that bpstat_clear is called and
stop_print_frame is set to 1 unconditionally already a few lines above the
bpstat_stop_status call, so there is no need to do it again.
Any suggestions why we should need the old special case ?
2000-03-12 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
* infrun.c (handle_inferior_event): Remove special case for stop
after proceeding over a breakpoint, it caused missed watchpoints.
*** gdb/infrun.c.orig Thu Feb 24 13:41:46 2000
--- gdb/infrun.c Mon Mar 13 10:11:50 2000
***************
*** 2076,2110 ****
return;
}
! /* Don't even think about breakpoints
! if just proceeded over a breakpoint.
!
! However, if we are trying to proceed over a breakpoint
! and end up in sigtramp, then through_sigtramp_breakpoint
! will be set and we should check whether we've hit the
! step breakpoint. */
! if (stop_signal == TARGET_SIGNAL_TRAP && trap_expected
! && through_sigtramp_breakpoint == NULL)
! bpstat_clear (&stop_bpstat);
! else
! {
! /* See if there is a breakpoint at the current PC. */
! stop_bpstat = bpstat_stop_status
! (&stop_pc,
! /* Pass TRUE if our reason for stopping is something other
! than hitting a breakpoint. We do this by checking that
! 1) stepping is going on and 2) we didn't hit a breakpoint
! in a signal handler without an intervening stop in
! sigtramp, which is detected by a new stack pointer value
! below any usual function calling stack adjustments. */
! (currently_stepping (ecs)
! && !(step_range_end
! && INNER_THAN (read_sp (), (step_sp - 16))))
! );
! /* Following in case break condition called a
! function. */
! stop_print_frame = 1;
! }
if (stop_signal == TARGET_SIGNAL_TRAP)
ecs->random_signal
--- 2092,2114 ----
return;
}
! /* See if there is a breakpoint at the current PC.
! Older versions of GDB did not call bpstat_stop_status after
! proceeding over a breakpoint, causing missed watchpoints when
! proceeding over a breakpoint on an instruction which triggers
! a watchpoint. */
! stop_bpstat = bpstat_stop_status
! (&stop_pc,
! /* Pass TRUE if our reason for stopping is something other
! than hitting a breakpoint. We do this by checking that
! 1) stepping is going on and 2) we didn't hit a breakpoint
! in a signal handler without an intervening stop in
! sigtramp, which is detected by a new stack pointer value
! below any usual function calling stack adjustments. */
! (currently_stepping (ecs)
! && !(step_range_end
! && INNER_THAN (read_sp (), (step_sp - 16))))
! );
if (stop_signal == TARGET_SIGNAL_TRAP)
ecs->random_signal
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de
From paire@ri.silicomp.fr Sat Apr 01 00:00:00 2000
From: Eric Paire <paire@ri.silicomp.fr>
To: Kevin Buettner <kevinb@cygnus.com>
Cc: Jim Blandy <jimb@cygnus.com>, gdb-patches@sourceware.cygnus.com, Michael Snyder <msnyder@cygnus.com>
Subject: Re: RFA: linux-thread.c change (fixes hang on startup)
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <200001241439.PAA24508@mailhost.ri.silicomp.fr>
References: <1000122102749.ZM17407@ocotillo.lan>
X-SW-Source: 2000-q1/msg00029.html
Content-length: 2526
> The code in question looks like this:
>
> /* initialize SIGCHLD mask */
> sigemptyset (&linuxthreads_wait_mask);
> sigaddset (&linuxthreads_wait_mask, SIGCHLD);
>
> /* Use SIG_BLOCK to block receipt of SIGCHLD.
> The block_mask will allow us to wait for this signal explicitly. */
> sigprocmask(SIG_BLOCK,
> &linuxthreads_wait_mask,
> &linuxthreads_block_mask);
>
> What this code fails to take into account is what happens if SIGCHLD is
> already being blocked. (Perhaps set that way from some other part of
> gdb.) If this is the case, then setting linuxthreads_block_mask to
> the old signal mask (prior to blocking the SIGCHLD with SIG_BLOCK)
> results in a mask with SIGCHLD blocked.
>
> This is clearly a problem because the loop noted above will get stuck
> in sigsuspend() if it doesn't manage to find a change in a child status
> on the first iteration.
>
> This leads me to the patch below and I hereby request approval for
> committing it. I have run the test suite on Linux and have observed
> no regressions as a result of this change.
>
I privately discussed the SIGCHLD management point with Michael, as this was
one major change in the LinuxThread support behaviour I wrote code for. My
only problem with your patch is that if SIGCHLD is blocked at that time, it
should have been blocked intentionally by other part of GDB, and if SIGCHLD
has not yet been unblocked, then this is a bug to fix in the right part
of GDB, and not in the LinuxThread support, because other parts of GDB
dealing with SIGCHLD [un]masking will also have to support the fix you
propose.
So, I would suggest that (thanks to your program which exhibits consistently
the problem) you try to track down the signal status in 'gdb_init()' and try
to discover what part of GDB is incorrectly managing SIGCHLD. After having
downloaded the latest GDB snapshot and looked at the source, I have not
been able to see any place where the SIGCHLD is being blocked before calling
'_initialize_linuxthreads()', but you should be able to discover that
quickly with your test program (perhaps in the 'pre_init_ui_hook' if you use
an UI).
Could you just check that for me. Thanks in advance,
-Eric
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Eric PAIRE
Web : http://www.ri.silicomp.com/~paire | Group SILICOMP - Research Institute
Email: eric.paire@ri.silicomp.com | 2, avenue de Vignate
Phone: +33 (0) 476 63 48 71 | F-38610 Gieres
Fax : +33 (0) 476 51 05 32 | FRANCE
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: A new revised patch for dlclose
2000-04-01 0:00 ` A new revised patch for dlclose H . J . Lu
@ 2000-04-01 0:00 ` Andrew Cagney
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2000-04-01 0:00 UTC (permalink / raw)
To: H . J . Lu; +Cc: gdb-patches
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2223 bytes --]
"H . J . Lu" wrote:
>
> On Tue, Mar 07, 2000 at 12:08:00PM -0800, H . J . Lu wrote:
> > Here is a revised patch for dlclose. If you take a look at the
> > dynamic linker in glibc 2.1 or above, you will find that it informs
> > gdb about loading/unloading a shared library via an internal debug
> > function, _dl_debug_state (). gdb already handles the loading in
> > handle_inferior_event () with BPSTAT_WHAT_CHECK_SHLIBS and
> > BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK. However, we need also
> > check the unloading event. solib_verify () will be called only when the
> > dynamic linker calls _dl_debug_state (). It shouldn't introduce any
> > overhead. I believe it is on the right track although it may be further
> > optimized.
H.J., I'm curious. Who is Sam Lantinga, they don't show up in GDB's
copyright assignment file.
Andrew
From rodneybrown@pmsc.com Sat Apr 01 00:00:00 2000
From: "Brown, Rodney" <rodneybrown@pmsc.com>
To: "'Andrew Cagney'" <ac131313@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: RE: 000215 some warning removal
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <9150F3E779F0D211BD370008C733141C38AADD@aus-msg-02.au.pmsc.com>
X-SW-Source: 2000-q1/msg00241.html
Content-length: 927
Title: RE: 000215 some warning removal
Using gcc-2.95.2 with the default configury, => -Wall
you get
warning: missing initializer
warning: (near initization for `memory_read_packet_config.size')
Give the use of these ones it's of doubtfull benefit.
For bfd/som.c you get deluged by warnings
> Rodney Brown wrote:
>
> > --- gdb/remote.c.orig  Wed Feb 9 19:52:47 2000
> > +++ gdb/remote.c       Thu Feb 17 16:18:46 2000
> > @@ -425,6 +425,8 @@
> >Â static struct memory_packet_config memory_write_packet_config =
> >Â {
> >Â Â Â "memory-write-packet-size",
> > +Â 0L,
> > +Â 0
> >Â };
> >
> >Â static void
> > @@ -448,6 +450,8 @@
> >Â static struct memory_packet_config memory_read_packet_config =
> >Â {
> >Â Â Â "memory-read-packet-size",
> > +Â 0L,
> > +Â 0
> >Â };
> >
> >Â static void
>
> Um, these have me puzzled. Are complete initializers required?
>
> Â Â Â Â Â Andrew
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: A revised patch for dlclose
[not found] ` <200003081441.JAA02876@devserv.devel.redhat.com>
@ 2000-03-08 14:35 ` Jim Blandy
0 siblings, 0 replies; 4+ messages in thread
From: Jim Blandy @ 2000-03-08 14:35 UTC (permalink / raw)
To: Jim Kingdon; +Cc: toddpw, hjl, kettenis, gdb-patches, gdb
> > If each DSO was given its own obstack, it would be pretty easy.
>
> This is largely a solved problem (via objfiles).
> [...]
> There are a few loose ends in freeing, but it is the tangled logic in
> find_solib that is tripping us up more than the freeing.
Yes, that's right.
I've pretty much come to the same conclusion as JimK --- I think there
are ways to repartition find_solib's responsibilities that will make
this logic a lot simpler.
From jimb@zwingli.cygnus.com Wed Mar 08 14:38:00 2000
From: Jim Blandy <jimb@zwingli.cygnus.com>
To: Jim Kingdon <kingdon@redhat.com>
Cc: Mark Kettenis <kettenis@wins.uva.nl>, gdb-patches@sourceware.cygnus.com, gdb@sourceware.cygnus.com
Subject: Re: A revised patch for dlclose
Date: Wed, 08 Mar 2000 14:38:00 -0000
Message-id: <npwvndaxzu.fsf@zwingli.cygnus.com>
References: <20000307120800.A27315@valinux.com> <200003080058.e280wga00453@delius.kettenis.local> <bzosakrpu.fsf@rtl.cygnus.com>
X-SW-Source: 2000-03/msg00165.html
Content-length: 537
> I do agree with HJ about one thing, though, which is that this issue
> is rather important. I'm trying to put my money where my mouth is by
> writing code but I'll have to admit that JimB's message left me a
> little unsure about where to turn.
You mean the vague "I don't understand the logic" comment? I concede
that it's not especially constructive criticism. But it was the
truth. :)
I think I've got some idea of how to fix this, but you know how these
things go --- don't let that stop you from thinking about it yourself.
From kettenis@wins.uva.nl Wed Mar 08 14:38:00 2000
From: Mark Kettenis <kettenis@wins.uva.nl>
To: gdb-patches@sourceware.cygnus.com
Subject: [PATCH] Fix `next'-ing out of a signal handler on Linux/i386
Date: Wed, 08 Mar 2000 14:38:00 -0000
Message-id: <200003082237.e28Mbre06925@delius.kettenis.local>
X-SW-Source: 2000-03/msg00164.html
Content-length: 2157
FYI,
I committed the attached patch. It is now possible to use the `next'
command to step out of a signal handler. Using `step' however is
still broken. Making that work will probably require some changes to
`infrun.c'. But I'm not sure exactly on how to fix it, and even if I
find out, I'm not sure whether I should touch that file before the 5.0
release.
Mark
2000-03-08 Mark Kettenis <kettenis@gnu.org>
* i386-tdep.c (i386_linux_saved_pc_after_call): New function.
* config/i386/tm-linux.h (SAVED_PC_AFTER_CALL): Define to call
i386_linux_saved_pc_after_call.
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.5
diff -u -p -r1.5 i386-tdep.c
--- i386-tdep.c 2000/03/04 23:37:33 1.5
+++ i386-tdep.c 2000/03/08 22:32:34
@@ -1024,6 +1024,17 @@ i386_linux_sigtramp_saved_sp (struct fra
return read_memory_integer (addr + LINUX_SIGCONTEXT_SP_OFFSET, 4);
}
+/* Immediately after a function call, return the saved pc. */
+
+CORE_ADDR
+i386_linux_saved_pc_after_call (struct frame_info *frame)
+{
+ if (frame->signal_handler_caller)
+ return i386_linux_sigtramp_saved_pc (frame);
+
+ return read_memory_integer (read_register (SP_REGNUM), 4);
+}
+
#endif /* I386_LINUX_SIGTRAMP */
#ifdef STATIC_TRANSFORM_NAME
Index: config/i386/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-linux.h,v
retrieving revision 1.2
diff -u -p -r1.2 tm-linux.h
--- config/i386/tm-linux.h 2000/03/04 23:37:33 1.2
+++ config/i386/tm-linux.h 2000/03/08 22:32:34
@@ -154,6 +154,10 @@ extern CORE_ADDR i386_linux_sigtramp_sav
extern CORE_ADDR i386_linux_sigtramp_saved_sp (struct frame_info *);
+#undef SAVED_PC_AFTER_CALL
+#define SAVED_PC_AFTER_CALL(frame) i386_linux_saved_pc_after_call (frame)
+extern CORE_ADDR i386_linux_saved_pc_after_call (struct frame_info *);
+
/* When we call a function in a shared library, and the PLT sends us
into the dynamic linker to find the function's real address, we
need to skip over the dynamic linker call. This function decides
From ac131313@cygnus.com Wed Mar 08 19:32:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Discussion <gdb@sourceware.cygnus.com>
Cc: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: [MAINT] Anthony Green - Java Maintainer
Date: Wed, 08 Mar 2000 19:32:00 -0000
Message-id: <38C71B06.94E21103@cygnus.com>
X-SW-Source: 2000-03/msg00166.html
Content-length: 2168
Hello,
I've made Anthony Green the Java maintainer.
enjoy,
Andrew
Thu Mar 9 14:21:07 2000 Andrew Cagney <cagney@b1.cygnus.com>
* MAINTAINERS (Core): Anthony Green is the Java - including
testsuite - maintainer. Reformat testsuite and language support
sections
Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/gdb/MAINTAINERS,v
retrieving revision 1.21
diff -p -r1.21 MAINTAINERS
*** MAINTAINERS 2000/03/05 08:46:56 1.21
--- MAINTAINERS 2000/03/09 03:26:56
*************** maintainers when resolving more generic
*** 56,62 ****
The host maintainer ensures that gdb (including mmalloc) can be built
as a cross debugger on their platform.
- hp testsuite (gdb.hp) *Jimmy Guo adl-debugger-wdb-merge-guru@cup.hp.com
djgpp native *Eli Zaretskii eliz@gnu.org
DJ Delorie dj@cygnus.com
MS Windows (N.T., CE, '00) host & native
--- 56,61 ----
*************** tracing Michael Snyder msnyder@cygnus
*** 90,96 ****
threads Michael Snyder msnyder@cygnus.com
breakpoint.c Michael Snyder msnyder@cygnus.com
language support David Taylor taylor@cygnus.com
! C++ language support Daniel Berlin dan@cgsoftware.com
expression eval David Taylor taylor@cygnus.com
defs.h David Taylor taylor@cygnus.com
utils.c David Taylor taylor@cygnus.com
--- 89,96 ----
threads Michael Snyder msnyder@cygnus.com
breakpoint.c Michael Snyder msnyder@cygnus.com
language support David Taylor taylor@cygnus.com
! C++ support Daniel Berlin dan@cgsoftware.com
! Java support Anthony Green green@cygnus.com
expression eval David Taylor taylor@cygnus.com
defs.h David Taylor taylor@cygnus.com
utils.c David Taylor taylor@cygnus.com
*************** rdi/adp protocol Fernando Nasser fnasse
*** 108,113 ****
--- 108,115 ----
gdbserver Stan Shebs shebs@apple.com
documentation Stan Shebs shebs@apple.com
testsuite Stan Shebs shebs@apple.com
+ hp tests (gdb.hp) *Jimmy Guo adl-debugger-wdb-merge-guru@cup.hp.com
+ Java tests (gdb.java) Anthony Green green@cygnus.com
Kernel Object Display Fernando Nasser fnasser@cygnus.com
From ac131313@cygnus.com Wed Mar 08 21:11:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Fernando Nasser <fnasser@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com, Elena Zannoni <ezannoni@cygnus.com>
Subject: Re: [Withdrawn] Re: RFA: Patch to blockframe.c, frame.h, arm-tdep.c and fr30-tdep.c (prologue cache)
Date: Wed, 08 Mar 2000 21:11:00 -0000
Message-id: <38C73268.9396081A@cygnus.com>
References: <38ACA4D6.993AFF74@cygnus.com> <38C3E596.F2D24DF6@cygnus.com>
X-SW-Source: 2000-03/msg00167.html
Content-length: 288
Fernando Nasser wrote:
>
> This patch is withdrawn.
>
> (Andrew, is this the right way of doing it (withdrawing a patch)?
There is no right wrong or in-different way :-)
Personally I'll reply to my original posting with the message withdrawn.
It really isn't that important.
Andrew
From ac131313@cygnus.com Wed Mar 08 21:36:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Jim Kingdon <kingdon@redhat.com>
Cc: Stephane Carrez <Stephane.Carrez@worldnet.fr>, gdb-patches@sourceware.cygnus.com, Jim Blandy <jimb@cygnus.com>
Subject: Re: path for gdb/dwarf2read.c, support 16-bit targets in dwarf-2
Date: Wed, 08 Mar 2000 21:36:00 -0000
Message-id: <38C737EE.513259B9@cygnus.com>
References: <38B2F3D3.54CF0AF0@worldnet.fr> <38BB5463.D6E5B75C@cygnus.com> <38C0D9D9.70987863@worldnet.fr> <38C225F3.9E236A55@cygnus.com> <bput8j8vi.fsf@rtl.cygnus.com>
X-SW-Source: 2000-03/msg00168.html
Content-length: 1496
Jim Kingdon wrote:
>
> > When I say ``elf16'', I was thinking of an elf object file that has 16
> > bit addresses. I'm not sure what other consequences such a move would
> > have.
>
> Strikes me as a bad idea. Or to put it another way, designing a
> hypothetical elf16 format seems like something you'd do only if you
> had pretty compelling reasons, not just to fix a GDB bug which can be
> fixed in much simpler ways.
I'm not sure that there is a GDB bug - GDB appears to have been given
wrong information.
> > Is there any reason why s->arch_size isn't 16 in your case?
> The whole address_significant_size code in dwarf2read.c strikes me as
> a rather ugly kludge to work around bugs elsewhere in the tool chain.
> If someone is supplying a 32 bit pointer to GDB on a 16 bit target,
> shouldn't the rest of the tool chain be responsible for making sure
> the high bits are zero rather than expecting GDB to mask it off?
> Granted there might be complications here, like there are cases on
> MIPS where we treat an address as signed rather than unsigned, but I'm
> also pretty clear on whether that is actually design or just a bug. I
> could be wrong/persuadable, of course, and perhaps someone has a
> better idea of all this (in which case I'd suggest commenting
> arch_size at bfd/elf-bfd.h and/or expanding comments at
> bfd_arch_bits_per_address in bfd/archures.c).
FYI, in the MIPS case it is a feature of the hardware. GDB has little
choice in the matter.
enjoy,
Andrew
From ac131313@cygnus.com Wed Mar 08 21:45:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Stephane Carrez <Stephane.Carrez@worldnet.fr>
Cc: Jim Kingdon <kingdon@redhat.com>, gdb-patches@sourceware.cygnus.com, Jim Blandy <jimb@cygnus.com>
Subject: Re: path for gdb/dwarf2read.c, support 16-bit targets in dwarf-2
Date: Wed, 08 Mar 2000 21:45:00 -0000
Message-id: <38C73A0C.CE903D0@cygnus.com>
References: <38B2F3D3.54CF0AF0@worldnet.fr> <38BB5463.D6E5B75C@cygnus.com> <38C0D9D9.70987863@worldnet.fr> <38C225F3.9E236A55@cygnus.com> <bput8j8vi.fsf@rtl.cygnus.com> <38C41970.C9433BAD@worldnet.fr>
X-SW-Source: 2000-03/msg00169.html
Content-length: 626
Stephane Carrez wrote:
>
> > > Is there any reason why s->arch_size isn't 16 in your case?
> >
>
> Because I thought it was related to the ELF format (32/64). I also looked
> at the bfd/cpu-d10v.c that uses ELF32 and 16-bit addresses. It also looked
> to me that this was quite coherent: define the ELF format in 'elf_size_info'
> and define the CPU addresses in 'bfd_arch_info'.
FYI, the d10v isn't that simple and very unique. While the hardware PC
appears to be 16 bits it's actually 18 plus implied segment information
(the bottom two bits are zero). It was all mapped onto a 32 bit address
for convenience.
Andrew
From ac131313@cygnus.com Wed Mar 08 21:52:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Fernando Nasser <fnasser@cygnus.com>
Cc: Fernando Nasser <fnasser@redhat.com>, gdb-patches@sourceware.cygnus.com
Subject: Re: RFA: Prologue cache fix
Date: Wed, 08 Mar 2000 21:52:00 -0000
Message-id: <38C73B9C.F1299241@cygnus.com>
References: <38B4073E.281C4CE0@redhat.com> <38BB65F6.44D991A2@cygnus.com> <38C412AC.952A1FA4@cygnus.com>
X-SW-Source: 2000-03/msg00170.html
Content-length: 278
Fernando Nasser wrote:
> Seems more logical.
>
> I vote to eliminate the prologue cache (as it seems that it has at least two serious bugs) and cope with the performance
> penalty until a valid optimization is found.
>
> What do you think?
Given it is broken, yes.
Andrew
From Peter.Schauer@regent.e-technik.tu-muenchen.de Thu Mar 09 01:40:00 2000
From: "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
To: kingdon@redhat.com (Jim Kingdon)
Cc: kevinb@cygnus.com, Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE, gdb-patches@sourceware.cygnus.com
Subject: RFA: solib.c: Clean fix to get rid of severe Solaris 2.7 sparc regressions
Date: Thu, 09 Mar 2000 01:40:00 -0000
Message-id: <200003090940.KAA32291@reisser.regent.e-technik.tu-muenchen.de>
References: <200003080336.WAA00424@devserv.devel.redhat.com>
X-SW-Source: 2000-03/msg00171.html
Content-length: 18710
> > I think there must be a better solution than the one that Peter
> > proposes. However, I don't know what it is either.
>
> Something like "extract_address (&lm->field, sizeof (lm->field))" I
> think. I didn't suggest that at first because I thought it would
> require massive solib.c changes to use separate internal and external
> structures like in BFD. But I guess that isn't true, I guess you can
> just change the cast to a call to extract_address.
Good idea, thanks. Here is a revised patch which gets rid of all
CORE_ADDR pointer casts in solib.c.
Once again the rationale for the patch:
This change:
2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* config.bfd: Enable 64 bit support for GNU/Linux/sparc.
* config.bfd: Enable 64 bit support for Solaris7+/sparc.
causes a severe regression in corefile.exp on Solaris 2.7 sparc, which
should definitely be fixed before the 5.0 release.
Due to the BFD change, a CORE_ADDR is now an unsigned long long with 64 Bits.
When casting 32 bit pointers to a CORE_ADDR in solib.c, the sign bit of the
pointer gets extended, resulting in a very large adress. This is not a
problem when accessing the inferior via procfs (because the address gets
truncated back to 32 bits in the procfs interface), but it causes failures
when trying to retrieve the shared library info from corefile BFDs.
2000-03-09 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
* solib.c (SOLIB_EXTRACT_ADDRESS): New macro to extract addresses
from solib structures. Use it throughout solib.c, get rid of all
CORE_ADDR casts.
(struct so_list): Change type of lmaddr to CORE_ADDR.
(first_link_map_member): Change return value type to CORE_ADDR,
update callers.
(solib_add_common_symbols): Change parameter type to CORE_ADDR,
update callers.
(open_symbol_file_object, find_solib): Change type of lm variable
to CORE_ADDR.
*** gdb/solib.c.orig Wed Nov 17 03:30:28 1999
--- gdb/solib.c Wed Mar 8 14:06:40 2000
***************
*** 109,121 ****
/* local data declarations */
#ifndef SVR4_SHARED_LIBS
! #define LM_ADDR(so) ((so) -> lm.lm_addr)
! #define LM_NEXT(so) ((so) -> lm.lm_next)
! #define LM_NAME(so) ((so) -> lm.lm_name)
/* Test for first link map entry; first entry is a shared library. */
! #define IGNORE_FIRST_LINK_MAP_ENTRY(x) (0)
static struct link_dynamic dynamic_copy;
static struct link_dynamic_2 ld_2_copy;
static struct ld_debug debug_copy;
--- 109,130 ----
/* local data declarations */
+ /* Macro to extract an address from a solib structure.
+ When GDB is configured for some 32-bit targets (e.g. Solaris 2.7
+ sparc), BFD is configured to handle 64-bit targets, so CORE_ADDR is
+ 64 bits. We have to extract only the significant bits of addresses
+ to get the right address when accessing the core file BFD. */
+
+ #define SOLIB_EXTRACT_ADDRESS(member) \
+ extract_address (&member, sizeof (member))
+
#ifndef SVR4_SHARED_LIBS
! #define LM_ADDR(so) (SOLIB_EXTRACT_ADDRESS ((so) -> lm.lm_addr))
! #define LM_NEXT(so) (SOLIB_EXTRACT_ADDRESS ((so) -> lm.lm_next))
! #define LM_NAME(so) (SOLIB_EXTRACT_ADDRESS ((so) -> lm.lm_name))
/* Test for first link map entry; first entry is a shared library. */
! #define IGNORE_FIRST_LINK_MAP_ENTRY(so) (0)
static struct link_dynamic dynamic_copy;
static struct link_dynamic_2 ld_2_copy;
static struct ld_debug debug_copy;
***************
*** 124,134 ****
#else /* SVR4_SHARED_LIBS */
! #define LM_ADDR(so) ((so) -> lm.l_addr)
! #define LM_NEXT(so) ((so) -> lm.l_next)
! #define LM_NAME(so) ((so) -> lm.l_name)
/* Test for first link map entry; first entry is the exec-file. */
! #define IGNORE_FIRST_LINK_MAP_ENTRY(x) ((x).l_prev == NULL)
static struct r_debug debug_copy;
char shadow_contents[BREAKPOINT_MAX]; /* Stash old bkpt addr contents */
--- 133,144 ----
#else /* SVR4_SHARED_LIBS */
! #define LM_ADDR(so) (SOLIB_EXTRACT_ADDRESS ((so) -> lm.l_addr))
! #define LM_NEXT(so) (SOLIB_EXTRACT_ADDRESS ((so) -> lm.l_next))
! #define LM_NAME(so) (SOLIB_EXTRACT_ADDRESS ((so) -> lm.l_name))
/* Test for first link map entry; first entry is the exec-file. */
! #define IGNORE_FIRST_LINK_MAP_ENTRY(so) \
! (SOLIB_EXTRACT_ADDRESS ((so) -> lm.l_prev) == 0)
static struct r_debug debug_copy;
char shadow_contents[BREAKPOINT_MAX]; /* Stash old bkpt addr contents */
***************
*** 138,144 ****
{
struct so_list *next; /* next structure in linked list */
struct link_map lm; /* copy of link map from inferior */
! struct link_map *lmaddr; /* addr in inferior lm was read from */
CORE_ADDR lmend; /* upper addr bound of mapped object */
char so_name[MAX_PATH_SIZE]; /* shared object lib name (FIXME) */
char symbols_loaded; /* flag: symbols read in yet? */
--- 148,154 ----
{
struct so_list *next; /* next structure in linked list */
struct link_map lm; /* copy of link map from inferior */
! CORE_ADDR lmaddr; /* addr in inferior lm was read from */
CORE_ADDR lmend; /* upper addr bound of mapped object */
char so_name[MAX_PATH_SIZE]; /* shared object lib name (FIXME) */
char symbols_loaded; /* flag: symbols read in yet? */
***************
*** 184,190 ****
static struct so_list *
find_solib PARAMS ((struct so_list *));
! static struct link_map *
first_link_map_member PARAMS ((void));
static CORE_ADDR
--- 194,200 ----
static struct so_list *
find_solib PARAMS ((struct so_list *));
! static CORE_ADDR
first_link_map_member PARAMS ((void));
static CORE_ADDR
***************
*** 206,212 ****
allocate_rt_common_objfile PARAMS ((void));
static void
! solib_add_common_symbols PARAMS ((struct rtc_symb *));
#endif
--- 216,222 ----
allocate_rt_common_objfile PARAMS ((void));
static void
! solib_add_common_symbols PARAMS ((CORE_ADDR));
#endif
***************
*** 338,346 ****
/* Relocate the section binding addresses as recorded in the shared
object's file by the base address to which the object was actually
mapped. */
! p->addr += (CORE_ADDR) LM_ADDR (so);
! p->endaddr += (CORE_ADDR) LM_ADDR (so);
! so->lmend = (CORE_ADDR) max (p->endaddr, so->lmend);
if (STREQ (p->the_bfd_section->name, ".text"))
{
so->textsection = p;
--- 348,356 ----
/* Relocate the section binding addresses as recorded in the shared
object's file by the base address to which the object was actually
mapped. */
! p->addr += LM_ADDR (so);
! p->endaddr += LM_ADDR (so);
! so->lmend = max (p->endaddr, so->lmend);
if (STREQ (p->the_bfd_section->name, ".text"))
{
so->textsection = p;
***************
*** 398,404 ****
static void
solib_add_common_symbols (rtc_symp)
! struct rtc_symb *rtc_symp;
{
struct rtc_symb inferior_rtc_symb;
struct nlist inferior_rtc_nlist;
--- 408,414 ----
static void
solib_add_common_symbols (rtc_symp)
! CORE_ADDR rtc_symp;
{
struct rtc_symb inferior_rtc_symb;
struct nlist inferior_rtc_nlist;
***************
*** 421,430 ****
while (rtc_symp)
{
! read_memory ((CORE_ADDR) rtc_symp,
(char *) &inferior_rtc_symb,
sizeof (inferior_rtc_symb));
! read_memory ((CORE_ADDR) inferior_rtc_symb.rtc_sp,
(char *) &inferior_rtc_nlist,
sizeof (inferior_rtc_nlist));
if (inferior_rtc_nlist.n_type == N_COMM)
--- 431,440 ----
while (rtc_symp)
{
! read_memory (rtc_symp,
(char *) &inferior_rtc_symb,
sizeof (inferior_rtc_symb));
! read_memory (SOLIB_EXTRACT_ADDRESS (inferior_rtc_symb.rtc_sp),
(char *) &inferior_rtc_nlist,
sizeof (inferior_rtc_nlist));
if (inferior_rtc_nlist.n_type == N_COMM)
***************
*** 435,441 ****
len = inferior_rtc_nlist.n_value - inferior_rtc_nlist.n_un.n_strx;
name = xmalloc (len);
! read_memory ((CORE_ADDR) inferior_rtc_nlist.n_un.n_name, name, len);
/* Allocate the runtime common objfile if necessary. */
if (rt_common_objfile == NULL)
--- 445,452 ----
len = inferior_rtc_nlist.n_value - inferior_rtc_nlist.n_un.n_strx;
name = xmalloc (len);
! read_memory (SOLIB_EXTRACT_ADDRESS (inferior_rtc_nlist.n_un.n_name),
! name, len);
/* Allocate the runtime common objfile if necessary. */
if (rt_common_objfile == NULL)
***************
*** 445,451 ****
mst_bss, rt_common_objfile);
free (name);
}
! rtc_symp = inferior_rtc_symb.rtc_next;
}
/* Install any minimal symbols that have been collected as the current
--- 456,462 ----
mst_bss, rt_common_objfile);
free (name);
}
! rtc_symp = SOLIB_EXTRACT_ADDRESS (inferior_rtc_symb.rtc_next);
}
/* Install any minimal symbols that have been collected as the current
***************
*** 857,866 ****
a pointer to the copy in our address space.
*/
! static struct link_map *
first_link_map_member ()
{
! struct link_map *lm = NULL;
#ifndef SVR4_SHARED_LIBS
--- 868,877 ----
a pointer to the copy in our address space.
*/
! static CORE_ADDR
first_link_map_member ()
{
! CORE_ADDR lm = 0;
#ifndef SVR4_SHARED_LIBS
***************
*** 869,877 ****
{
/* It is a version that we can deal with, so read in the secondary
structure and find the address of the link map list from it. */
! read_memory ((CORE_ADDR) dynamic_copy.ld_un.ld_2, (char *) &ld_2_copy,
sizeof (struct link_dynamic_2));
! lm = ld_2_copy.ld_loaded;
}
#else /* SVR4_SHARED_LIBS */
--- 880,889 ----
{
/* It is a version that we can deal with, so read in the secondary
structure and find the address of the link map list from it. */
! read_memory (SOLIB_EXTRACT_ADDRESS (dynamic_copy.ld_un.ld_2),
! (char *) &ld_2_copy,
sizeof (struct link_dynamic_2));
! lm = SOLIB_EXTRACT_ADDRESS (ld_2_copy.ld_loaded);
}
#else /* SVR4_SHARED_LIBS */
***************
*** 880,886 ****
/* FIXME: Perhaps we should validate the info somehow, perhaps by
checking r_version for a known version number, or r_state for
RT_CONSISTENT. */
! lm = debug_copy.r_map;
#endif /* !SVR4_SHARED_LIBS */
--- 892,898 ----
/* FIXME: Perhaps we should validate the info somehow, perhaps by
checking r_version for a known version number, or r_state for
RT_CONSISTENT. */
! lm = SOLIB_EXTRACT_ADDRESS (debug_copy.r_map);
#endif /* !SVR4_SHARED_LIBS */
***************
*** 912,918 ****
PTR arg;
{
int from_tty = (int) arg; /* sneak past catch_errors */
! struct link_map *lm, lmcopy;
char *filename;
int errcode;
--- 924,931 ----
PTR arg;
{
int from_tty = (int) arg; /* sneak past catch_errors */
! CORE_ADDR lm;
! struct link_map lmcopy;
char *filename;
int errcode;
***************
*** 924,940 ****
return 0; /* failed somehow... */
/* First link map member should be the executable. */
! if ((lm = first_link_map_member ()) == NULL)
return 0; /* failed somehow... */
/* Read from target memory to GDB. */
! read_memory ((CORE_ADDR) lm, (void *) &lmcopy, sizeof (lmcopy));
if (lmcopy.l_name == 0)
return 0; /* no filename. */
/* Now fetch the filename from target memory. */
! target_read_string ((CORE_ADDR) lmcopy.l_name, &filename,
MAX_PATH_SIZE - 1, &errcode);
if (errcode)
{
--- 937,953 ----
return 0; /* failed somehow... */
/* First link map member should be the executable. */
! if ((lm = first_link_map_member ()) == 0)
return 0; /* failed somehow... */
/* Read from target memory to GDB. */
! read_memory (lm, (void *) &lmcopy, sizeof (lmcopy));
if (lmcopy.l_name == 0)
return 0; /* no filename. */
/* Now fetch the filename from target memory. */
! target_read_string (SOLIB_EXTRACT_ADDRESS (lmcopy.l_name), &filename,
MAX_PATH_SIZE - 1, &errcode);
if (errcode)
{
***************
*** 979,985 ****
struct so_list *so_list_ptr; /* Last lm or NULL for first one */
{
struct so_list *so_list_next = NULL;
! struct link_map *lm = NULL;
struct so_list *new;
if (so_list_ptr == NULL)
--- 992,998 ----
struct so_list *so_list_ptr; /* Last lm or NULL for first one */
{
struct so_list *so_list_next = NULL;
! CORE_ADDR lm = 0;
struct so_list *new;
if (so_list_ptr == NULL)
***************
*** 1002,1012 ****
{
/* We have been called before, and are in the process of walking
the shared library list. Advance to the next shared object. */
! if ((lm = LM_NEXT (so_list_ptr)) == NULL)
{
/* We have hit the end of the list, so check to see if any were
added, but be quiet if we can't read from the target any more. */
! int status = target_read_memory ((CORE_ADDR) so_list_ptr->lmaddr,
(char *) &(so_list_ptr->lm),
sizeof (struct link_map));
if (status == 0)
--- 1015,1025 ----
{
/* We have been called before, and are in the process of walking
the shared library list. Advance to the next shared object. */
! if ((lm = LM_NEXT (so_list_ptr)) == 0)
{
/* We have hit the end of the list, so check to see if any were
added, but be quiet if we can't read from the target any more. */
! int status = target_read_memory (so_list_ptr->lmaddr,
(char *) &(so_list_ptr->lm),
sizeof (struct link_map));
if (status == 0)
***************
*** 1015,1026 ****
}
else
{
! lm = NULL;
}
}
so_list_next = so_list_ptr->next;
}
! if ((so_list_next == NULL) && (lm != NULL))
{
/* Get next link map structure from inferior image and build a local
abbreviated load_map structure */
--- 1028,1039 ----
}
else
{
! lm = 0;
}
}
so_list_next = so_list_ptr->next;
}
! if ((so_list_next == NULL) && (lm != 0))
{
/* Get next link map structure from inferior image and build a local
abbreviated load_map structure */
***************
*** 1045,1063 ****
}
so_list_next = new;
! read_memory ((CORE_ADDR) lm, (char *) &(new->lm),
! sizeof (struct link_map));
/* For SVR4 versions, the first entry in the link map is for the
inferior executable, so we must ignore it. For some versions of
SVR4, it has no name. For others (Solaris 2.3 for example), it
does have a name, so we can no longer use a missing name to
decide when to ignore it. */
! if (!IGNORE_FIRST_LINK_MAP_ENTRY (new->lm))
{
int errcode;
char *buffer;
! target_read_string ((CORE_ADDR) LM_NAME (new), &buffer,
! MAX_PATH_SIZE - 1, &errcode);
if (errcode != 0)
{
warning ("find_solib: Can't read pathname for load map: %s\n",
--- 1058,1075 ----
}
so_list_next = new;
! read_memory (lm, (char *) &(new->lm), sizeof (struct link_map));
/* For SVR4 versions, the first entry in the link map is for the
inferior executable, so we must ignore it. For some versions of
SVR4, it has no name. For others (Solaris 2.3 for example), it
does have a name, so we can no longer use a missing name to
decide when to ignore it. */
! if (!IGNORE_FIRST_LINK_MAP_ENTRY (new))
{
int errcode;
char *buffer;
! target_read_string (LM_NAME (new),
! &buffer, MAX_PATH_SIZE - 1, &errcode);
if (errcode != 0)
{
warning ("find_solib: Can't read pathname for load map: %s\n",
***************
*** 1101,1107 ****
(PTR) &lowest_sect);
if (lowest_sect)
text_addr = bfd_section_vma (so->abfd, lowest_sect)
! + (CORE_ADDR) LM_ADDR (so);
}
ALL_OBJFILES (so->objfile)
--- 1113,1119 ----
(PTR) &lowest_sect);
if (lowest_sect)
text_addr = bfd_section_vma (so->abfd, lowest_sect)
! + LM_ADDR (so);
}
ALL_OBJFILES (so->objfile)
***************
*** 1351,1358 ****
{
if (so->so_name[0])
{
! if ((address >= (CORE_ADDR) LM_ADDR (so)) &&
! (address < (CORE_ADDR) so->lmend))
return (so->so_name);
}
}
--- 1363,1369 ----
{
if (so->so_name[0])
{
! if ((address >= LM_ADDR (so)) && (address < so->lmend))
return (so->so_name);
}
}
***************
*** 1484,1490 ****
write_memory (flag_addr, (char *) &in_debugger, sizeof (in_debugger));
! breakpoint_addr = (CORE_ADDR) debug_copy.ldd_bp_addr;
write_memory (breakpoint_addr, (char *) &debug_copy.ldd_bp_inst,
sizeof (debug_copy.ldd_bp_inst));
--- 1495,1501 ----
write_memory (flag_addr, (char *) &in_debugger, sizeof (in_debugger));
! breakpoint_addr = SOLIB_EXTRACT_ADDRESS (debug_copy.ldd_bp_addr);
write_memory (breakpoint_addr, (char *) &debug_copy.ldd_bp_inst,
sizeof (debug_copy.ldd_bp_inst));
***************
*** 1579,1585 ****
/* Calc address of debugger interface structure */
! debug_addr = (CORE_ADDR) dynamic_copy.ldd;
/* Calc address of `in_debugger' member of debugger interface structure */
--- 1590,1596 ----
/* Calc address of debugger interface structure */
! debug_addr = SOLIB_EXTRACT_ADDRESS (dynamic_copy.ldd);
/* Calc address of `in_debugger' member of debugger interface structure */
***************
*** 1881,1887 ****
/* FIXME, this needs work for cross-debugging of core files
(byteorder, size, alignment, etc). */
! debug_addr = (CORE_ADDR) dynamic_copy.ldd;
}
/* Read the debugger structure from the inferior, just to make sure
--- 1892,1898 ----
/* FIXME, this needs work for cross-debugging of core files
(byteorder, size, alignment, etc). */
! debug_addr = SOLIB_EXTRACT_ADDRESS (dynamic_copy.ldd);
}
/* Read the debugger structure from the inferior, just to make sure
***************
*** 1896,1902 ****
if (debug_copy.ldd_cp)
{
! solib_add_common_symbols (debug_copy.ldd_cp);
}
#endif /* !SVR4_SHARED_LIBS */
--- 1907,1913 ----
if (debug_copy.ldd_cp)
{
! solib_add_common_symbols (SOLIB_EXTRACT_ADDRESS (debug_copy.ldd_cp));
}
#endif /* !SVR4_SHARED_LIBS */
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de
From Peter.Schauer@regent.e-technik.tu-muenchen.de Thu Mar 09 02:21:00 2000
From: "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
To: gdb-patches@sourceware.cygnus.com
Subject: Withdrawn: Severe regression in corefile.exp with Solaris 2.7 sparc + hack
Date: Thu, 09 Mar 2000 02:21:00 -0000
Message-id: <200003091021.LAA32403@reisser.regent.e-technik.tu-muenchen.de>
References: <200003072113.WAA26253@reisser.regent.e-technik.tu-muenchen.de>
X-SW-Source: 2000-03/msg00172.html
Content-length: 167
This hack is superseded by a clean patch in
http://sourceware.cygnus.com/ml/gdb-patches/2000-q1/msg00610.html
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de
From eliz@delorie.com Thu Mar 09 04:10:00 2000
From: Eli Zaretskii <eliz@delorie.com>
To: hjl@lucon.org
Cc: gdb@sourceware.cygnus.com, gdb-patches@sourceware.cygnus.com
Subject: Re: Problems with hardware watchpoint on ia32.
Date: Thu, 09 Mar 2000 04:10:00 -0000
Message-id: <200003091210.HAA19857@indy.delorie.com>
References: <20000307132401.A20282@valinux.com> <200003081008.FAA16481@indy.delorie.com> <20000308084304.A3150@lucon.org>
X-SW-Source: 2000-03/msg00173.html
Content-length: 7737
Okay, to put my money where my mouth is, I'm posting patches to
correct two problems related to hardware breakpoints and watchpoints.
These were all found in the DJGPP (a.k.a. go32) version of GDB, but I
firmly believe that they can be seen on any x86 platform, at least in
native debugging, and possibly on other platforms as well.
Each one of the two messages, this and the next, handles a specific
problem.
Problem no.1: GDB cannot watch bit fields with hardware watchpoints.
Example:
$ cat bf.c
int main (int argc, char *argv[])
{
struct foo {
int iv;
double dv;
unsigned flag1:1;
unsigned flag2:2;
int jv;
} foo_var, *foo_ptr;
foo_var.flag1 = 1;
foo_var.flag2 = foo_var.flag1 + 1;
return 0;
}
$ gcc -g -o bf bf.c
$ gdb bf
(gdb) b main
Breakpoint 1 at 0x1573: file bf.c, line 11.
(gdb) r
Starting program: g:/gdbsnap/gdb-0222/gdb/bf
Breakpoint 1, main (argc=1, argv=0x8c6fc) at bf.c:11
11 foo_var.flag1 = 1;
(gdb) watch foo_var.flag1
Watchpoint 2: foo_var.flag1
Here are the patches, after which you can set hardware watchpoints on
bit fields. You will notice that these patches also augment the
lazy-value trick suggested by Jim Blandy as a means to watch struct
members; this is because that trick doesn't work for bit fields, and
because I regard it generally fragile as far as watchpoints are
considered (we depend on the assumption that GDB doesn't evaluate
parent structures, but nothing in GDB's code suggests that this
assumption will hold).
2000-03-08 Eli Zaretskii <eliz@is.elta.co.il>
* breakpoint.c (insert_breakpoints, remove_breakpoint)
(bpstat_stop_status, can_use_hardware_watchpoint): Don't insert,
remove, or check status of hardware watchpoints for entire structs
and arrays unless the user explicitly asked to watch that struct
or array.
(insert_breakpoints): Try to insert watchpoints for all the values
on the value chain, even if some of them fail to insert.
* values.c (value_primitive_field): Set the offset in struct value
we return when the field is a packed bitfield.
--- gdb/breakpoint.c~1 Wed Mar 8 18:16:00 2000
+++ gdb/breakpoint.c Wed Mar 8 19:20:28 2000
@@ -974,24 +974,39 @@ insert_breakpoints ()
if (VALUE_LVAL (v) == lval_memory
&& ! VALUE_LAZY (v))
{
- CORE_ADDR addr;
- int len, type;
+ struct type *vtype = check_typedef (VALUE_TYPE (v));
- addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
- len = TYPE_LENGTH (VALUE_TYPE (v));
- type = hw_write;
- if (b->type == bp_read_watchpoint)
- type = hw_read;
- else if (b->type == bp_access_watchpoint)
- type = hw_access;
-
- val = target_insert_watchpoint (addr, len, type);
- if (val == -1)
+ /* We only watch structs and arrays if user asked
+ for it explicitly, never if they just happen to
+ appear in the middle of some value chain. */
+ if (v == b->val_chain
+ || (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
+ && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
{
- b->inserted = 0;
- break;
+ CORE_ADDR addr;
+ int len, type;
+
+ addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
+ len = TYPE_LENGTH (VALUE_TYPE (v));
+ type = hw_write;
+ if (b->type == bp_read_watchpoint)
+ type = hw_read;
+ else if (b->type == bp_access_watchpoint)
+ type = hw_access;
+
+ val = target_insert_watchpoint (addr, len, type);
+ if (val == -1)
+ {
+ /* Don't exit the loop, try to insert
+ every value on the value chain. That's
+ because we will be removing all the
+ watches below, and removing a
+ watchpoint we didn't insert could have
+ adverse effects. */
+ b->inserted = 0;
+ }
+ val = 0;
}
- val = 0;
}
}
/* Failure to insert a watchpoint on any memory value in the
@@ -1327,21 +1342,28 @@ remove_breakpoint (b, is)
if (VALUE_LVAL (v) == lval_memory
&& ! VALUE_LAZY (v))
{
- CORE_ADDR addr;
- int len, type;
+ struct type *vtype = check_typedef (VALUE_TYPE (v));
- addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
- len = TYPE_LENGTH (VALUE_TYPE (v));
- type = hw_write;
- if (b->type == bp_read_watchpoint)
- type = hw_read;
- else if (b->type == bp_access_watchpoint)
- type = hw_access;
-
- val = target_remove_watchpoint (addr, len, type);
- if (val == -1)
- b->inserted = 1;
- val = 0;
+ if (v == b->val_chain
+ || (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
+ && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
+ {
+ CORE_ADDR addr;
+ int len, type;
+
+ addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
+ len = TYPE_LENGTH (VALUE_TYPE (v));
+ type = hw_write;
+ if (b->type == bp_read_watchpoint)
+ type = hw_read;
+ else if (b->type == bp_access_watchpoint)
+ type = hw_access;
+
+ val = target_remove_watchpoint (addr, len, type);
+ if (val == -1)
+ b->inserted = 1;
+ val = 0;
+ }
}
}
/* Failure to remove any of the hardware watchpoints comes here. */
@@ -2571,14 +2593,21 @@ bpstat_stop_status (pc, not_a_breakpoint
if (VALUE_LVAL (v) == lval_memory
&& ! VALUE_LAZY (v))
{
- CORE_ADDR vaddr;
+ struct type *vtype = check_typedef (VALUE_TYPE (v));
- vaddr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
- /* Exact match not required. Within range is sufficient.
- */
- if (addr >= vaddr &&
- addr < vaddr + TYPE_LENGTH (VALUE_TYPE (v)))
- found = 1;
+ if (v == b->val_chain
+ || (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
+ && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
+ {
+ CORE_ADDR vaddr;
+
+ vaddr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
+ /* Exact match not required. Within range is
+ sufficient. */
+ if (addr >= vaddr &&
+ addr < vaddr + TYPE_LENGTH (VALUE_TYPE (v)))
+ found = 1;
+ }
}
}
if (found)
@@ -5515,6 +5544,7 @@ can_use_hardware_watchpoint (v)
struct value *v;
{
int found_memory_cnt = 0;
+ struct value *head = v;
/* Did the user specifically forbid us to use hardware watchpoints? */
if (!can_use_hw_watchpoints)
@@ -5552,13 +5582,23 @@ can_use_hardware_watchpoint (v)
{
/* Ahh, memory we actually used! Check if we can cover
it with hardware watchpoints. */
- CORE_ADDR vaddr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
- int len = TYPE_LENGTH (VALUE_TYPE (v));
+ struct type *vtype = check_typedef (VALUE_TYPE (v));
- if (!TARGET_REGION_OK_FOR_HW_WATCHPOINT (vaddr, len))
- return 0;
- else
- found_memory_cnt++;
+ /* We only watch structs and arrays if user asked for it
+ explicitly, never if they just happen to appear in a
+ middle of some value chain. */
+ if (v == head
+ || (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
+ && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
+ {
+ CORE_ADDR vaddr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
+ int len = TYPE_LENGTH (VALUE_TYPE (v));
+
+ if (!TARGET_REGION_OK_FOR_HW_WATCHPOINT (vaddr, len))
+ return 0;
+ else
+ found_memory_cnt++;
+ }
}
}
else if (v->lval != not_lval && v->modifiable == 0)
--- gdb/values.c~0 Thu Sep 9 02:20:18 1999
+++ gdb/values.c Wed Mar 8 18:53:48 2000
@@ -802,6 +802,8 @@ value_primitive_field (arg1, offset, fie
fieldno));
VALUE_BITPOS (v) = TYPE_FIELD_BITPOS (arg_type, fieldno) % 8;
VALUE_BITSIZE (v) = TYPE_FIELD_BITSIZE (arg_type, fieldno);
+ VALUE_OFFSET (v) = VALUE_OFFSET (arg1) + offset
+ + TYPE_FIELD_BITPOS (arg_type, fieldno) / 8;
}
else if (fieldno < TYPE_N_BASECLASSES (arg_type))
{
From eliz@delorie.com Thu Mar 09 04:11:00 2000
From: Eli Zaretskii <eliz@delorie.com>
To: hjl@lucon.org
Cc: gdb@sourceware.cygnus.com, gdb-patches@sourceware.cygnus.com
Subject: Re: Problems with hardware watchpoint on ia32.
Date: Thu, 09 Mar 2000 04:11:00 -0000
Message-id: <200003091211.HAA19860@indy.delorie.com>
References: <20000307132401.A20282@valinux.com> <200003081008.FAA16481@indy.delorie.com> <20000308084304.A3150@lucon.org>
X-SW-Source: 2000-03/msg00174.html
Content-length: 1704
Problem no.2: Read watchpoints break when they shouldn't.
Example (slightly modified test program posted by H.J. Lu):
$ cat wp.c
int a1;
int a2;
int a3;
int a4;
int a5;
int a6;
unsigned long long ulla1 = 0;
double da2 = 0;
int main (void)
{
a2 = 12;
a3 = 13;
a4 = 14;
a5 = 15;
a6 = 16;
a1 = 11;
a2 = a4;
ulla1 = 0x00000000ffffffffLL;
da2 = 12;
ulla1 = 0xffffffff00000000LL;
return 0;
}
$ gcc -g -o wp wp.c
$ gdb wp
(gdb) watch a5
Hardware watchpoint 2: a5
(gdb) rwatch a5
Hardware read watchpoint 3: a5
(gdb) run
Starting program g:/gdbsnap/gdb-0222/gdb/wp
Hardware watchpoint 2: a5
Old value = 0
New value = 15
Hardware read watchpoint 3: a5
Value = 15
main () at wp.c: 16
16 a5 = 15;
(gdb)
Now, it might seem like a strange idea to put two watchpoints on the
same variable, but it is a very useful feature when each watchpoint
has a different condition.
Here's the patch:
2000-03-08 Eli Zaretskii <eliz@is.elta.co.il>
* breakpoint.c (bpstat_stop_status): Don't stop if a read
watchpoint appears to break, but the watched value changed.
--- gdb/breakpoint.c~2 Wed Mar 8 19:20:28 2000
+++ gdb/breakpoint.c Wed Mar 8 20:02:20 2000
@@ -2620,6 +2620,17 @@ bpstat_stop_status (pc, not_a_breakpoint
/* Stop. */
break;
case WP_VALUE_CHANGED:
+ if (b->type == bp_read_watchpoint)
+ {
+ /* Don't stop: read watchpoints shouldn't fire if
+ the value has changed. This is for targets which
+ cannot set read-only watchpoints. */
+ bs->print_it = print_it_noop;
+ bs->stop = 0;
+ continue;
+ }
+ ++(b->hit_count);
+ break;
case WP_VALUE_NOT_CHANGED:
/* Stop. */
++(b->hit_count);
From ac131313@cygnus.com Thu Mar 09 05:20:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Charles-Antoine Gauthier <charles.gauthier@nrc.ca>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: GDB patch for 167Bug
Date: Thu, 09 Mar 2000 05:20:00 -0000
Message-id: <38C7A4F6.8CA859E6@cygnus.com>
References: <38C42988.2AE770D7@nrc.ca>
X-SW-Source: 2000-03/msg00175.html
Content-length: 3040
Charles-Antoine Gauthier wrote:
>
> Attached is a patch to allow GDB 4.18 to write to the MVME167 through
> 167Bug. The MS command does not work; the MW command must be used.
>
> The ChangeLog hunk has context from the RTEMS patches. It probably will
> not apply cleanly, but it is quite short.
As far as I know, GDB doesn't contain the file ``167bug-rom.c''. Could
this be a local version?
Andrew
PS, FYI, when submitting patches, they shouldn't include a diff to the
ChangeLog, see ``submitting a patch'' in:
http://sourceware.cygnus.com/cgi-bin/cvsweb.cgi/~checkout~/src/gdb/CONTRIBUTE?content-type=text/x-cvsweb-markup&cvsroot=src
>
> ------------------------------------------------------------------------
> *** gdb-4.18/gdb/167bug-rom.c Mon Mar 6 14:20:50 2000
> --- ../gdb/gdb/167bug-rom.c Mon Mar 6 14:54:42 2000
> ***************
> *** 110,118 ****
> m167bug_cmds.clr_break = "nobr %x\r"; /* clear a breakpoint */
> m167bug_cmds.clr_all_break = "nobr\r"; /* clear all breakpoints */
> m167bug_cmds.fill = "bf %x:%x %x;b\r"; /* fill (start count val) */
> ! m167bug_cmds.setmem.cmdb = "ms %x %02x\r"; /* setmem.cmdb (addr, value) */
> ! m167bug_cmds.setmem.cmdw = "ms %x %04x\r"; /* setmem.cmdw (addr, value) */
> ! m167bug_cmds.setmem.cmdl = "ms %x %08x\r"; /* setmem.cmdl (addr, value) */
> m167bug_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
> m167bug_cmds.setmem.resp_delim = NULL; /* setreg.resp_delim */
> m167bug_cmds.setmem.term = NULL; /* setreg.term */
> --- 110,118 ----
> m167bug_cmds.clr_break = "nobr %x\r"; /* clear a breakpoint */
> m167bug_cmds.clr_all_break = "nobr\r"; /* clear all breakpoints */
> m167bug_cmds.fill = "bf %x:%x %x;b\r"; /* fill (start count val) */
> ! m167bug_cmds.setmem.cmdb = "mw %x %02x;b\r"; /* setmem.cmdb (addr, value) */
> ! m167bug_cmds.setmem.cmdw = "mw %x %04x;w\r"; /* setmem.cmdw (addr, value) */
> ! m167bug_cmds.setmem.cmdl = "mw %x %08x;l\r"; /* setmem.cmdl (addr, value) */
> m167bug_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
> m167bug_cmds.setmem.resp_delim = NULL; /* setreg.resp_delim */
> m167bug_cmds.setmem.term = NULL; /* setreg.term */
> *** gdb-4.18/gdb/ChangeLog Mon Mar 6 15:38:40 2000
> --- ../gdb/gdb/ChangeLog Mon Mar 6 16:33:39 2000
> ***************
> *** 1,3 ****
> --- 1,7 ----
> + 2000-03-06 Charles-Antoine Gauthier <charles.gauthier@nrc.ca>
> +
> + * 167bug-rom.c(init_m167bug_cmds): Change the write commands.
> +
> Fri Aug 6 165:41:15 EDT 1999 Charles-A. Gauthier <charles.gauthier@iit.nrc.ca>
>
> * config/m68k/monitor.mt (TDEPFILES): Add 167bug-rom.o.
From eliz@delorie.com Thu Mar 09 05:28:00 2000
From: Eli Zaretskii <eliz@delorie.com>
To: toddpw@windriver.com
Cc: jtc@redback.com, hjl@valinux.com, gdb-patches@sourceware.cygnus.com, gdb@sourceware.cygnus.com
Subject: Re: A patch for ia32 hardware watchpoint.
Date: Thu, 09 Mar 2000 05:28:00 -0000
Message-id: <200003091328.IAA19934@indy.delorie.com>
References: <200003080845.AAA18410@alabama.wrs.com>
X-SW-Source: 2000-03/msg00176.html
Content-length: 1307
> As far as I'm concerned, passing the breakpoint pointer is the right way
> to go; we should get away from the assumption that a target side breakpoint
> is an address with some #define'd size, and push that stuff into a default
> implementation that can be invoked easily by people writing new target
> support.
I agree.
But if we do that, I'd also suggest to leave it to the target to
decide whether a particular watchpoint fired or not.
Right now, the API presented by GDB is based solely on the address:
bpstat_stop_status calls target_stopped_data_address and does all the
decision-making based solely on that address (and some info it keeps
internally about each watchpoint).
This API is extremely limited. Typically, the target knows much more
about the watchpoint which triggered than the generic GDB code does,
so it can make smarter decisions. But in order to do that, the target
needs more information about the watchpoint, and it needs to pass back
to GDB the result (whether the watchpoint triggered or not), not its
address.
Btw, if we let the target decide whether a given watchpoint triggered,
we can also resolve, once and for all, all the various conflicts
between target-specific limitations of hardware-assisted watchpoints,
which now need to be dealt with on the generic level.
From ac131313@cygnus.com Thu Mar 09 05:33:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: RFA: procfs.c:proc_set_watchpoint bug fix
Date: Thu, 09 Mar 2000 05:33:00 -0000
Message-id: <38C7A799.A06CF13B@cygnus.com>
References: <200003072114.WAA26143@reisser.regent.e-technik.tu-muenchen.de>
X-SW-Source: 2000-03/msg00178.html
Content-length: 845
"Peter.Schauer" wrote:
> * procfs.c (proc_set_watchpoint): Declare addr parameter as
> CORE_ADDR, to match call from procfs_set_watchpoint.
Might as well get the knife out - convert the definition to ISO-C and
make it static. (Good find, outch!)
enjoy,
Andrew
> *** gdb/procfs.c.orig Wed Mar 1 21:54:05 2000
> --- gdb/procfs.c Sun Mar 5 12:05:33 2000
> ***************
> *** 2580,2586 ****
> int
> proc_set_watchpoint (pi, addr, len, wflags)
> procinfo *pi;
> ! void *addr;
> int len;
> int wflags;
> {
> --- 2580,2586 ----
> int
> proc_set_watchpoint (pi, addr, len, wflags)
> procinfo *pi;
> ! CORE_ADDR addr;
> int len;
> int wflags;
> {
>
> --
> Peter Schauer pes@regent.e-technik.tu-muenchen.de
From eliz@delorie.com Thu Mar 09 05:33:00 2000
From: Eli Zaretskii <eliz@delorie.com>
To: ezannoni@cygnus.com
Cc: shebs@apple.com, gdb-patches@sourceware.cygnus.com
Subject: Re: Handle_inferior_event() problem
Date: Thu, 09 Mar 2000 05:33:00 -0000
Message-id: <200003091332.IAA19945@indy.delorie.com>
References: <14533.28395.325377.920332@kwikemart.cygnus.com>
X-SW-Source: 2000-03/msg00177.html
Content-length: 511
> Say you have stepped your way to the first instruction of the prologue
> of a function (using stepi, for instance) and now you do a 'nexti'.
> The programs runs away to the end of the function or somewhere else and
> gdb gets really confused.
Confirmed in the DJGPP version: the problem exists just like you
described.
> Anyway, long story short... How about this patch? It doesn't take
> care of everything, but it solves that immediate problem.
Confirmed again: problem solved with this patch. Thanks!
From eliz@delorie.com Thu Mar 09 05:37:00 2000
From: Eli Zaretskii <eliz@delorie.com>
To: Peter.Schauer@regent.e-technik.tu-muenchen.de
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: RFA: breakpoint.c: Minor output fixes for hardware watchpoints
Date: Thu, 09 Mar 2000 05:37:00 -0000
Message-id: <200003091337.IAA19948@indy.delorie.com>
References: <200003072114.WAA26280@reisser.regent.e-technik.tu-muenchen.de>
X-SW-Source: 2000-03/msg00179.html
Content-length: 884
> During implementation of hardware watchpoints on Solaris, I noticed the
> following inconsistencies in breakpoint.c output between software and
> hardware breakpoints.
Both problems confirmed on x86 using the DJGPP native version.
Actually, these two problems were on my todo list since last summer,
but since they are merely annoyances, they got pushed back ;-).
> Here is a patch for both problems:
>
> 2000-03-07 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
>
> * breakpoint.c (insert_breakpoints, do_enable_breakpoint): Reselect
> the saved frame silently after frame selection for watchpoint
> evaluation.
> (insert_breakpoints): Add missing space in `Hardware watchpoint
> deleted' message. Do not reinsert hardware watchpoint if it is
> already marked for deletion at next stop.
Both problems are gone with these patches in the DJGPP version.
Thanks!
From scottb@netwinder.org Thu Mar 09 06:02:00 2000
From: Scott Bambrough <scottb@netwinder.org>
To: GDB Patches Mail List <gdb-patches@sourceware.cygnus.com>
Subject: Patch fallen through the cracks?
Date: Thu, 09 Mar 2000 06:02:00 -0000
Message-id: <38C7ADD4.A6697C36@netwinder.org>
X-SW-Source: 2000-03/msg00180.html
Content-length: 253
Can someone approve this patch please. It shouldn't be a problem.
http://sourceware.cygnus.com/ml/gdb-patches/2000-q1/msg00367.html
Scott
--
Scott Bambrough - Software Engineer
REBEL.COM http://www.rebel.com
NetWinder http://www.netwinder.org
From ac131313@cygnus.com Thu Mar 09 06:51:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: "H . J . Lu" <hjl@valinux.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: A patch for Solairis 2.7/x86.
Date: Thu, 09 Mar 2000 06:51:00 -0000
Message-id: <38C7BA33.C0BA455@cygnus.com>
References: <20000307135347.A20608@valinux.com>
X-SW-Source: 2000-03/msg00181.html
Content-length: 331
"H . J . Lu" wrote:
>
> I have reported it long time ago. I am resending my patch now.
> +/* On sol2.7, <curses.h> emits a bunch of 'macro redefined'
> + warnings, which makes autoconf think curses.h doesn't
> + exist. Compensate fot that here. */
> +#define HAVE_CURSES_H 1
This sounds more like an autoconf bug.
Andrew
From fnasser@redhat.com Thu Mar 09 07:03:00 2000
From: Fernando Nasser <fnasser@redhat.com>
To: Scott Bambrough <scottb@netwinder.org>
Cc: GDB Patches Mail List <gdb-patches@sourceware.cygnus.com>
Subject: Re: Patch fallen through the cracks?
Date: Thu, 09 Mar 2000 07:03:00 -0000
Message-id: <38C7BD11.9A8188CF@redhat.com>
References: <38C7ADD4.A6697C36@netwinder.org>
X-SW-Source: 2000-03/msg00182.html
Content-length: 746
Scott Bambrough wrote:
>
> Can someone approve this patch please. It shouldn't be a problem.
>
> http://sourceware.cygnus.com/ml/gdb-patches/2000-q1/msg00367.html
>
I would rather have it xfail'ed. It means that we know this test won't
work on this platform but it is not ding what we want (this is what pass
would mean).
Could you please add a small comment before the "if" as well, explaining
why it won't work on ARM?
After these changes there is no need to resubmit the patch though, just
post what went in.
Thanks.
--
Fernando Nasser
Red Hat, Inc. - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311
Toronto, Ontario M4P 2C9 Fax: 416-482-6299
From fnasser@redhat.com Thu Mar 09 07:13:00 2000
From: Fernando Nasser <fnasser@redhat.com>
To: Kevin Buettner <kevinb@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: store_floating() and arm-tdep.c
Date: Thu, 09 Mar 2000 07:13:00 -0000
Message-id: <38C7BF53.731F8CF6@redhat.com>
References: <1000229000345.ZM15006@ocotillo.lan> <38BCE46B.CD7889B5@cygnus.com> <1000302074643.ZM19182@ocotillo.lan>
X-SW-Source: 2000-03/msg00183.html
Content-length: 1142
Now that Kevin fixed store_floating() we can use it in arm-tdep.c (as
well as extract_floating). The code in there works fine for remote
targets but Scott has reported it fails for native Linux-ARM.
I won't be able to get to this until next week and I am afraid that
Andrew will cut a gdb 5 branch before that.
I wonder if anyone (Scott? Kevin?) could/would be willing to do that
sooner.
Please let me know if you can so I don't start to work on it as well.
Thanks.
Fernando
P.S.: I can run the test on remote ARM targets. I will need someone to
volunteer running the tests on native as well? Scott, I guess you are
the most appropriate "volunteer" :-)
Kevin Buettner wrote:
>
> On Mar 1, 8:35pm, Andrew Cagney wrote:
>
> > > * findvar.c (extract_floating, store_floating): Use target
> > > floating point type sizes rather host sizes to determine
> [...]
> > Approved.
>
> Committed.
>
> Kevin
--
Fernando Nasser
Red Hat, Inc. - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311
Toronto, Ontario M4P 2C9 Fax: 416-482-6299
From ac131313@cygnus.com Thu Mar 09 07:16:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: "H . J . Lu" <hjl@valinux.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: A patch for ia32 hardware watchpoint.
Date: Thu, 09 Mar 2000 07:16:00 -0000
Message-id: <38C7C031.2F0F6D7A@cygnus.com>
References: <20000307132613.B20282@valinux.com>
X-SW-Source: 2000-03/msg00184.html
Content-length: 973
"H . J . Lu" wrote:
> +#ifdef NEED_WATCHPOINT_NUMBER
> + val = target_insert_watchpoint (b->number, addr,
> + len, type);
> +#else
> val = target_insert_watchpoint (addr, len, type);
> +#endif
> +#ifdef NEED_WATCHPOINT_NUMBER
> + val = target_remove_watchpoint (b->number, addr, len,
> + type);
> +#else
> val = target_remove_watchpoint (addr, len, type);
> +#endif
> +#ifdef NEED_WATCHPOINT_NUMBER
> + if (bpt->type == bp_hardware_watchpoint)
> + target_delete_watchpoint (bpt->number);
> +#endif
Just FYI, changes like this are no longer acceptable in generic parts of
GDB (they were once and I spent a good part of a year trying to purge
the worst of them).
Either, test the conditional before the call or (often better) always
make the call and provide a default NOP version of the function.
Andrew
From ac131313@cygnus.com Thu Mar 09 07:24:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Fernando Nasser <fnasser@redhat.com>
Cc: Scott Bambrough <scottb@netwinder.org>, GDB Patches Mail List <gdb-patches@sourceware.cygnus.com>
Subject: Re: Patch fallen through the cracks?
Date: Thu, 09 Mar 2000 07:24:00 -0000
Message-id: <38C7C1C8.C4A8796A@cygnus.com>
References: <38C7ADD4.A6697C36@netwinder.org> <38C7BD11.9A8188CF@redhat.com>
X-SW-Source: 2000-03/msg00185.html
Content-length: 692
Fernando Nasser wrote:
>
> Scott Bambrough wrote:
> >
> > Can someone approve this patch please. It shouldn't be a problem.
> >
> > http://sourceware.cygnus.com/ml/gdb-patches/2000-q1/msg00367.html
> >
>
> I would rather have it xfail'ed. It means that we know this test won't
> work on this platform but it is not ding what we want (this is what pass
> would mean).
I thought the patch was basically correct - the arm has that brain dead
wacko swapped double format.
The only suggestion I've had made would be to test a more generic
attribute indicating the exact format of a double V long rather than
test the arm target. Other platforms can have the same problem.
enjoy,
Andrew
From fnasser@redhat.com Thu Mar 09 07:42:00 2000
From: Fernando Nasser <fnasser@redhat.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: Scott Bambrough <scottb@netwinder.org>, GDB Patches Mail List <gdb-patches@sourceware.cygnus.com>
Subject: Re: Patch fallen through the cracks?
Date: Thu, 09 Mar 2000 07:42:00 -0000
Message-id: <38C7C5FF.FB73F0E2@redhat.com>
References: <38C7ADD4.A6697C36@netwinder.org> <38C7BD11.9A8188CF@redhat.com> <38C7C1C8.C4A8796A@cygnus.com>
X-SW-Source: 2000-03/msg00186.html
Content-length: 727
Andrew Cagney wrote:
>
> The only suggestion I've had made would be to test a more generic
> attribute indicating the exact format of a double V long rather than
> test the arm target. Other platforms can have the same problem.
>
This would be really nice. Maybe a previous test that would ascertain
how the doubles are stored and set a tcl variable accordingly. This
could then be tested to xfail or not the test that is currently failing.
But I am not sure how to do it (what to test).
Any suggestions?
--
Fernando Nasser
Red Hat, Inc. - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311
Toronto, Ontario M4P 2C9 Fax: 416-482-6299
From ac131313@cygnus.com Thu Mar 09 07:49:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: "H . J . Lu" <hjl@valinux.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: A new revised patch for dlclose
Date: Thu, 09 Mar 2000 07:49:00 -0000
Message-id: <38C7C7C7.CD90829D@cygnus.com>
References: <20000307120800.A27315@valinux.com> <20000307122129.A3568@valinux.com>
X-SW-Source: 2000-03/msg00187.html
Content-length: 841
"H . J . Lu" wrote:
>
> On Tue, Mar 07, 2000 at 12:08:00PM -0800, H . J . Lu wrote:
> > Here is a revised patch for dlclose. If you take a look at the
> > dynamic linker in glibc 2.1 or above, you will find that it informs
> > gdb about loading/unloading a shared library via an internal debug
> > function, _dl_debug_state (). gdb already handles the loading in
> > handle_inferior_event () with BPSTAT_WHAT_CHECK_SHLIBS and
> > BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK. However, we need also
> > check the unloading event. solib_verify () will be called only when the
> > dynamic linker calls _dl_debug_state (). It shouldn't introduce any
> > overhead. I believe it is on the right track although it may be further
> > optimized.
H.J., I'm curious. Who is Sam Lantinga, they don't show up in GDB's
copyright assignment file.
Andrew
From hjl@lucon.org Thu Mar 09 07:56:00 2000
From: "H . J . Lu" <hjl@lucon.org>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: A new revised patch for dlclose
Date: Thu, 09 Mar 2000 07:56:00 -0000
Message-id: <20000309075645.A7175@lucon.org>
References: <20000307120800.A27315@valinux.com> <20000307122129.A3568@valinux.com> <38C7C7C7.CD90829D@cygnus.com>
X-SW-Source: 2000-03/msg00188.html
Content-length: 1096
On Fri, Mar 10, 2000 at 02:48:23AM +1100, Andrew Cagney wrote:
> "H . J . Lu" wrote:
> >
> > On Tue, Mar 07, 2000 at 12:08:00PM -0800, H . J . Lu wrote:
> > > Here is a revised patch for dlclose. If you take a look at the
> > > dynamic linker in glibc 2.1 or above, you will find that it informs
> > > gdb about loading/unloading a shared library via an internal debug
> > > function, _dl_debug_state (). gdb already handles the loading in
> > > handle_inferior_event () with BPSTAT_WHAT_CHECK_SHLIBS and
> > > BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK. However, we need also
> > > check the unloading event. solib_verify () will be called only when the
> > > dynamic linker calls _dl_debug_state (). It shouldn't introduce any
> > > overhead. I believe it is on the right track although it may be further
> > > optimized.
>
> H.J., I'm curious. Who is Sam Lantinga, they don't show up in GDB's
> copyright assignment file.
>
I think he works for Loki, the game company. They use thread and dlopen
a lot. In anycase, my latest dlclose fix is totally different from his
original patch.
H.J.
From hjl@valinux.com Thu Mar 09 07:59:00 2000
From: "H . J . Lu" <hjl@valinux.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: A patch for Solairis 2.7/x86.
Date: Thu, 09 Mar 2000 07:59:00 -0000
Message-id: <20000309075920.A15938@valinux.com>
References: <20000307135347.A20608@valinux.com> <38C7BA33.C0BA455@cygnus.com>
X-SW-Source: 2000-03/msg00189.html
Content-length: 592
On Fri, Mar 10, 2000 at 01:50:27AM +1100, Andrew Cagney wrote:
> "H . J . Lu" wrote:
> >
> > I have reported it long time ago. I am resending my patch now.
>
> > +/* On sol2.7, <curses.h> emits a bunch of 'macro redefined'
> > + warnings, which makes autoconf think curses.h doesn't
> > + exist. Compensate fot that here. */
> > +#define HAVE_CURSES_H 1
>
> This sounds more like an autoconf bug.
>
That may be true. I just copied the code from Solaris 2.7/Sparc when
I was puzzled by why I could build gdb on Solaris 2.7/Sparc, but not
Solairis 2.7/x86.
--
H.J. Lu (hjl@gnu.org)
From scottb@netwinder.org Thu Mar 09 08:01:00 2000
From: Scott Bambrough <scottb@netwinder.org>
To: Fernando Nasser <fnasser@redhat.com>
Cc: Kevin Buettner <kevinb@cygnus.com>, gdb-patches@sourceware.cygnus.com
Subject: Re: store_floating() and arm-tdep.c
Date: Thu, 09 Mar 2000 08:01:00 -0000
Message-id: <38C7C9A4.3566EC87@netwinder.org>
References: <1000229000345.ZM15006@ocotillo.lan> <38BCE46B.CD7889B5@cygnus.com> <1000302074643.ZM19182@ocotillo.lan> <38C7BF53.731F8CF6@redhat.com>
X-SW-Source: 2000-03/msg00190.html
Content-length: 1193
Fernando Nasser wrote:
> Now that Kevin fixed store_floating() we can use it in arm-tdep.c (as
> well as extract_floating). The code in there works fine for remote
> targets but Scott has reported it fails for native Linux-ARM.
I'll be looking into this today. Don't worry about it.
> P.S.: I can run the test on remote ARM targets. I will need someone to
> volunteer running the tests on native as well? Scott, I guess you are
> the most appropriate "volunteer" :-)
I've been running tests on the ARM Linux target on a NetWinder regularly. The
results of the testsuite follow. Most of the problems are due to no
linuxthreads support and problems stepping in/out or backtracing in signal
handlers. I'll work at implementing support for these over time. I was hoping
to port the x86 work, but just haven't had the time.
=== gdb Summary ===
# of expected passes 6306
# of unexpected failures 46
# of unexpected successes 1
# of expected failures 195
# of unresolved testcases 1
# of untested testcases 18
--
Scott Bambrough - Software Engineer
REBEL.COM http://www.rebel.com
NetWinder http://www.netwinder.org
From msnyder@cygnus.com Thu Mar 09 10:49:00 2000
From: Michael Snyder <msnyder@cygnus.com>
To: Scott Bambrough <scottb@netwinder.org>
Cc: Fernando Nasser <fnasser@redhat.com>, Kevin Buettner <kevinb@cygnus.com>, gdb-patches@sourceware.cygnus.com
Subject: Re: store_floating() and arm-tdep.c
Date: Thu, 09 Mar 2000 10:49:00 -0000
Message-id: <38C7F23D.61AF@cygnus.com>
References: <1000229000345.ZM15006@ocotillo.lan> <38BCE46B.CD7889B5@cygnus.com> <1000302074643.ZM19182@ocotillo.lan> <38C7BF53.731F8CF6@redhat.com> <38C7C9A4.3566EC87@netwinder.org>
X-SW-Source: 2000-03/msg00191.html
Content-length: 986
Scott Bambrough wrote:
>
> Fernando Nasser wrote:
>
> > Now that Kevin fixed store_floating() we can use it in arm-tdep.c (as
> > well as extract_floating). The code in there works fine for remote
> > targets but Scott has reported it fails for native Linux-ARM.
>
> I'll be looking into this today. Don't worry about it.
>
> > P.S.: I can run the test on remote ARM targets. I will need someone to
> > volunteer running the tests on native as well? Scott, I guess you are
> > the most appropriate "volunteer" :-)
>
> I've been running tests on the ARM Linux target on a NetWinder regularly. The
> results of the testsuite follow. Most of the problems are due to no
> linuxthreads support and problems stepping in/out or backtracing in signal
> handlers. I'll work at implementing support for these over time. I was hoping
> to port the x86 work, but just haven't had the time.
Hmm, the new thread_db module should be pretty
target-independent (correct me if I'm wrong).
From ezannoni@cygnus.com Thu Mar 09 10:51:00 2000
From: Elena Zannoni <ezannoni@cygnus.com>
To: gdb-patches@sourceware.cygnus.com
Subject: PATCH: printing elements of typedef'ed arrays
Date: Thu, 09 Mar 2000 10:51:00 -0000
Message-id: <14535.62150.908914.943283@kwikemart.cygnus.com>
X-SW-Source: 2000-03/msg00192.html
Content-length: 1493
[Sorry, wrong list...]
When an array is typedeffed, like in this example:
typedef long ArrayLong [10];
ArrayLong a1;
typedef struct s
{
int a;
int b;
} structure;
long a2 [10];
structure s1;
int main (void)
{
return 0;
}
Gdb cannot print individual elements of the array a1:
(gdb) p a1
$1 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
(gdb) p a1[0]
$2 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} <<<< is incorrect
(gdb) p a2
$3 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
(gdb) p a2[0]
$4 = 0
(gdb)
The following patch takes care of this.
I tested it on solaris and showed no regressions.
OK to check in?
Elena
% cvs diff -c eval.c
Index: eval.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/eval.c,v
retrieving revision 1.107
diff -c -r1.107 eval.c
*** eval.c 1999/12/11 13:52:47 1.107
--- eval.c 2000/03/09 18:36:54
***************
*** 1875,1881 ****
val =
locate_var_value
(var, block_innermost_frame (exp->elts[pc + 1].block));
! return value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (SYMBOL_TYPE (var))),
val);
}
/* FALLTHROUGH */
--- 1875,1881 ----
val =
locate_var_value
(var, block_innermost_frame (exp->elts[pc + 1].block));
! return value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (check_typedef (SYMBOL_TYPE (var)))),
val);
}
/* FALLTHROUGH */
From shebs@apple.com Thu Mar 09 11:09:00 2000
From: Stan Shebs <shebs@apple.com>
To: Scott Bambrough <scottb@netwinder.org>
Cc: GDB Patches Mail List <gdb-patches@sourceware.cygnus.com>
Subject: Re: Patch fallen through the cracks?
Date: Thu, 09 Mar 2000 11:09:00 -0000
Message-id: <38C7F6D6.D49D9B04@apple.com>
References: <38C7ADD4.A6697C36@netwinder.org>
X-SW-Source: 2000-03/msg00193.html
Content-length: 477
Scott Bambrough wrote:
>
> Can someone approve this patch please. It shouldn't be a problem.
>
> http://sourceware.cygnus.com/ml/gdb-patches/2000-q1/msg00367.html
OK OK, I know I'm a slacker. :-) But so as to avoid confusing
future generations of hackers (scary thought, to imagine people
running the GDB testsuite in 2025...), you should put your basic
rationale for the different number in a comment for this test -
it's not obvious from the patch alone. Thanks!
Stan
From shebs@apple.com Thu Mar 09 11:18:00 2000
From: Stan Shebs <shebs@apple.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: "H . J . Lu" <hjl@valinux.com>, gdb-patches@sourceware.cygnus.com
Subject: Re: A new revised patch for dlclose
Date: Thu, 09 Mar 2000 11:18:00 -0000
Message-id: <38C7F8F2.3C4AE23C@apple.com>
References: <20000307120800.A27315@valinux.com> <20000307122129.A3568@valinux.com> <38C7C7C7.CD90829D@cygnus.com>
X-SW-Source: 2000-03/msg00194.html
Content-length: 537
Andrew Cagney wrote:
> H.J., I'm curious. Who is Sam Lantinga, they don't show up in GDB's
> copyright assignment file.
Sam is the main genius behind all those commercial Linux games you
can see on store shelves these days. He also maintains the SDL
library, which is the LGPL cross-platform library that makes those
game ports possible. (Dig under lokigames.com's open source pages
to see more.) Sam thus qualifies as a key GDB user who should be
taken seriously, and who is clearly not afraid to hack GDB if it
needs it...
Stan
From hjl@lucon.org Thu Mar 09 13:58:00 2000
From: "H . J . Lu" <hjl@lucon.org>
To: gdb-patches@sourceware.cygnus.com
Subject: A new patch for regex
Date: Thu, 09 Mar 2000 13:58:00 -0000
Message-id: <20000309135848.A8287@lucon.org>
X-SW-Source: 2000-03/msg00195.html
Content-length: 7258
This patch overrides all the previous ones.
H.J.
----
2000-03-09 H.J. Lu <hjl@gnu.org>
* gdb_regex.h: New. Include "regex.h" if USE_INCLUDED_REGEX
is defined and <regex.h> otherwise.
* irix5-nat.c: Include "gdb_regex.h" instead of "gnu-regex.h".
* monitor.c: Likewise.
* osfsolib.c: Likewise.
* solib.c: Likewise.
* source.c: Likewise.
* symtab.c: Likewise.
* Makefile.in (REGEX): Changed to @REGEX@.
(REGEX_CFLAGS): New.
(REGEX1): Removed.
(ADD_DEPS): Use $(REGEX) instead of $(REGEX1).
(INTERNAL_WARN_CFLAGS): Add $(REGEX_CFLAGS).
* configure.in (--with-included-regex): New switch.
(REGEX): New. Subsstitue @REGEX@ in Makefile.in.
(REGEX_CFLAGS): New. Subsstitue @REGEX_CFLAGS@ in Makefile.in.
* configure: Regenerated.
Index: irix5-nat.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/irix5-nat.c,v
retrieving revision 1.1.1.3
retrieving revision 1.3
diff -u -p -r1.1.1.3 -r1.3
--- irix5-nat.c 1999/11/19 23:38:46 1.1.1.3
+++ irix5-nat.c 2000/03/08 00:36:03 1.3
@@ -278,7 +278,7 @@ fetch_core_registers (core_reg_sect, cor
#include "objfiles.h"
#include "command.h"
#include "frame.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
#include "inferior.h"
#include "language.h"
#include "gdbcmd.h"
Index: monitor.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/monitor.c,v
retrieving revision 1.1.1.5
retrieving revision 1.3
diff -u -p -r1.1.1.5 -r1.3
--- monitor.c 2000/03/07 18:42:14 1.1.1.5
+++ monitor.c 2000/03/08 00:36:03 1.3
@@ -50,7 +50,7 @@
#include "monitor.h"
#include "gdbcmd.h"
#include "inferior.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
#include "dcache.h"
#include "srec.h"
Index: osfsolib.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/osfsolib.c,v
retrieving revision 1.1.1.3
retrieving revision 1.3
diff -u -p -r1.1.1.3 -r1.3
--- osfsolib.c 1999/11/19 23:38:50 1.1.1.3
+++ osfsolib.c 2000/03/08 00:36:03 1.3
@@ -36,7 +36,7 @@
#include "command.h"
#include "target.h"
#include "frame.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
#include "inferior.h"
#include "language.h"
#include "gdbcmd.h"
Index: solib.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/solib.c,v
retrieving revision 1.1.1.4
retrieving revision 1.7
diff -u -p -r1.1.1.4 -r1.7
--- solib.c 2000/03/07 18:42:17 1.1.1.4
+++ solib.c 2000/03/08 18:36:11 1.7
@@ -49,7 +49,7 @@
#include "command.h"
#include "target.h"
#include "frame.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
#include "inferior.h"
#include "environ.h"
#include "language.h"
Index: source.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/source.c,v
retrieving revision 1.1.1.3
retrieving revision 1.3
diff -u -p -r1.1.1.3 -r1.3
--- source.c 2000/02/04 20:21:58 1.1.1.3
+++ source.c 2000/03/08 00:36:03 1.3
@@ -33,7 +33,7 @@
#include "gdb_stat.h"
#include <fcntl.h>
#include "gdbcore.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
#include "symfile.h"
#include "objfiles.h"
#include "annotate.h"
Index: symtab.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/symtab.c,v
retrieving revision 1.1.1.4
retrieving revision 1.3
diff -u -p -r1.1.1.4 -r1.3
--- symtab.c 2000/03/07 18:42:17 1.1.1.4
+++ symtab.c 2000/03/08 00:36:03 1.3
@@ -30,7 +30,7 @@
#include "objfiles.h"
#include "gdbcmd.h"
#include "call-cmds.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
#include "expression.h"
#include "language.h"
#include "demangle.h"
Index: Makefile.in
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/Makefile.in,v
retrieving revision 1.1.1.9
diff -u -p -r1.1.1.9 Makefile.in
--- Makefile.in 2000/03/07 18:42:08 1.1.1.9
+++ Makefile.in 2000/03/08 23:48:52
@@ -114,6 +114,11 @@ LIBIBERTY = ../libiberty/libiberty.a
MMALLOC = @MMALLOC@
MMALLOC_CFLAGS = @MMALLOC_CFLAGS@
+# We are using our own version of REGEX now to be consistent across
+# machines.
+REGEX = @REGEX@
+REGEX_CFLAGS = @REGEX_CFLAGS@
+
# Where is the BFD library? Typically in ../bfd.
BFD_DIR = ../bfd
BFD = $(BFD_DIR)/libbfd.a
@@ -271,7 +276,8 @@ INTERNAL_WARN_CFLAGS = \
$(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
$(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \
- $(INTL_CFLAGS) $(TUI_CFLAGS) $(ENABLE_CFLAGS) $(GDB_WARN_CFLAGS)
+ $(INTL_CFLAGS) $(TUI_CFLAGS) $(ENABLE_CFLAGS) \
+ $(REGEX_CFLAGS) $(GDB_WARN_CFLAGS)
INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
# LDFLAGS is specifically reserved for setting from the command line
@@ -283,11 +289,6 @@ INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS
INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS) @HLDFLAGS@
HLDENV = @HLDENV@
-# We are using our own version of REGEX now to be consistent across
-# machines.
-REGEX = gnu-regex.o
-REGEX1 = gnu-regex.o
-
# If your system is missing alloca(), or, more likely, it's there but
# it doesn't work, then refer to libiberty.
@@ -308,7 +309,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CD
$(OPCODES) $(MMALLOC) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS)
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
-ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
+ADD_DEPS = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
VERSION = 20000204
DIST=gdb
Index: configure.in
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/configure.in,v
retrieving revision 1.1.1.6
diff -u -p -r1.1.1.6 configure.in
--- configure.in 2000/03/07 18:42:10 1.1.1.6
+++ configure.in 2000/03/09 21:50:46
@@ -505,6 +505,36 @@ if test x$want_mmalloc = xtrue; then
MMALLOC='../mmalloc/libmmalloc.a'
fi
+AC_ARG_WITH(included-regex,
+[ --with-included-regex Use included regex],
+[case "${withval}" in
+ yes) want_included_regex=true ;;
+ no) want_included_regex=false;;
+ *) AC_MSG_ERROR(bad value ${withval} for GDB with-included-regex option) ;;
+esac],[want_included_regex=false])dnl
+
+REGEX="gnu-regex.o"
+REGEX_CFLAGS="-DUSE_INCLUDED_REGEX"
+if test $want_included_regex = false; then
+ AC_MSG_CHECKING(for GNU regex)
+ AC_CACHE_VAL(gdb_cv_have_gnu_regex,
+[AC_TRY_COMPILE([#include <gnu-versions.h>
+#include <sys/types.h>
+#include <regex.h>],
+[#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
+#error No valid GNU regex.
+#endif
+],
+ [gdb_cv_have_gnu_regex=yes],
+ [gdb_cv_have_gnu_regex=no])])
+ AC_MSG_RESULT($gdb_cv_have_gnu_regex)
+ if test $gdb_cv_have_gnu_regex = yes; then
+ REGEX=
+ REGEX_CFLAGS=
+ fi
+fi
+AC_SUBST(REGEX)
+AC_SUBST(REGEX_CFLAGS)
# In the Cygwin environment, we need some additional flags.
AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin,
--- /dev/null Tue May 5 13:32:27 1998
+++ gdb_regex.h Thu Mar 9 13:31:26 2000
@@ -0,0 +1,7 @@
+#ifndef _GDB_REGEX_H
+#ifdef USE_INCLUDED_REGEX
+#include "gnu-regex.h"
+#else
+#include <regex.h>
+#endif
+#endif /* _GDB_REGEX_H */
From hjl@lucon.org Thu Mar 09 14:09:00 2000
From: "H . J . Lu" <hjl@lucon.org>
To: muller@cerbere.u-strasbg.fr
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: A new patch for regex
Date: Thu, 09 Mar 2000 14:09:00 -0000
Message-id: <20000309140937.A8350@lucon.org>
References: <20000309135848.A8287@lucon.org> <3.0.6.32.20000309230751.00a67390@ics.u-strasbg.fr>
X-SW-Source: 2000-03/msg00196.html
Content-length: 7570
On Thu, Mar 09, 2000 at 11:07:51PM +0100, muller@cerbere.u-strasbg.fr wrote:
> >+#ifndef _GDB_REGEX_H
>
> Not that I want to be picky but
> Isn't there a little
> #define _GDB_REGEX_H
> missing here ??
> Otherwise I don't understand anymore
> why all headers are surrounded by ifdefs
>
Ooops. Thanks. Here is a new one.
H.J.
---
2000-03-09 H.J. Lu <hjl@gnu.org>
* gdb_regex.h: New. Include "regex.h" if USE_INCLUDED_REGEX
is defined and <regex.h> otherwise.
* irix5-nat.c: Include "gdb_regex.h" instead of "gnu-regex.h".
* monitor.c: Likewise.
* osfsolib.c: Likewise.
* solib.c: Likewise.
* source.c: Likewise.
* symtab.c: Likewise.
* Makefile.in (REGEX): Changed to @REGEX@.
(REGEX_CFLAGS): New.
(REGEX1): Removed.
(ADD_DEPS): Use $(REGEX) instead of $(REGEX1).
(INTERNAL_WARN_CFLAGS): Add $(REGEX_CFLAGS).
* configure.in (--with-included-regex): New switch.
(REGEX): New. Subsstitue @REGEX@ in Makefile.in.
(REGEX_CFLAGS): New. Subsstitue @REGEX_CFLAGS@ in Makefile.in.
* configure: Regenerated.
Index: irix5-nat.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/irix5-nat.c,v
retrieving revision 1.1.1.3
retrieving revision 1.3
diff -u -p -r1.1.1.3 -r1.3
--- irix5-nat.c 1999/11/19 23:38:46 1.1.1.3
+++ irix5-nat.c 2000/03/08 00:36:03 1.3
@@ -278,7 +278,7 @@ fetch_core_registers (core_reg_sect, cor
#include "objfiles.h"
#include "command.h"
#include "frame.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
#include "inferior.h"
#include "language.h"
#include "gdbcmd.h"
Index: monitor.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/monitor.c,v
retrieving revision 1.1.1.5
retrieving revision 1.3
diff -u -p -r1.1.1.5 -r1.3
--- monitor.c 2000/03/07 18:42:14 1.1.1.5
+++ monitor.c 2000/03/08 00:36:03 1.3
@@ -50,7 +50,7 @@
#include "monitor.h"
#include "gdbcmd.h"
#include "inferior.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
#include "dcache.h"
#include "srec.h"
Index: osfsolib.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/osfsolib.c,v
retrieving revision 1.1.1.3
retrieving revision 1.3
diff -u -p -r1.1.1.3 -r1.3
--- osfsolib.c 1999/11/19 23:38:50 1.1.1.3
+++ osfsolib.c 2000/03/08 00:36:03 1.3
@@ -36,7 +36,7 @@
#include "command.h"
#include "target.h"
#include "frame.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
#include "inferior.h"
#include "language.h"
#include "gdbcmd.h"
Index: solib.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/solib.c,v
retrieving revision 1.1.1.4
retrieving revision 1.7
diff -u -p -r1.1.1.4 -r1.7
--- solib.c 2000/03/07 18:42:17 1.1.1.4
+++ solib.c 2000/03/08 18:36:11 1.7
@@ -49,7 +49,7 @@
#include "command.h"
#include "target.h"
#include "frame.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
#include "inferior.h"
#include "environ.h"
#include "language.h"
Index: source.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/source.c,v
retrieving revision 1.1.1.3
retrieving revision 1.3
diff -u -p -r1.1.1.3 -r1.3
--- source.c 2000/02/04 20:21:58 1.1.1.3
+++ source.c 2000/03/08 00:36:03 1.3
@@ -33,7 +33,7 @@
#include "gdb_stat.h"
#include <fcntl.h>
#include "gdbcore.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
#include "symfile.h"
#include "objfiles.h"
#include "annotate.h"
Index: symtab.c
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/symtab.c,v
retrieving revision 1.1.1.4
retrieving revision 1.3
diff -u -p -r1.1.1.4 -r1.3
--- symtab.c 2000/03/07 18:42:17 1.1.1.4
+++ symtab.c 2000/03/08 00:36:03 1.3
@@ -30,7 +30,7 @@
#include "objfiles.h"
#include "gdbcmd.h"
#include "call-cmds.h"
-#include "gnu-regex.h"
+#include "gdb_regex.h"
#include "expression.h"
#include "language.h"
#include "demangle.h"
Index: Makefile.in
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/Makefile.in,v
retrieving revision 1.1.1.9
diff -u -p -r1.1.1.9 Makefile.in
--- Makefile.in 2000/03/07 18:42:08 1.1.1.9
+++ Makefile.in 2000/03/08 23:48:52
@@ -114,6 +114,11 @@ LIBIBERTY = ../libiberty/libiberty.a
MMALLOC = @MMALLOC@
MMALLOC_CFLAGS = @MMALLOC_CFLAGS@
+# We are using our own version of REGEX now to be consistent across
+# machines.
+REGEX = @REGEX@
+REGEX_CFLAGS = @REGEX_CFLAGS@
+
# Where is the BFD library? Typically in ../bfd.
BFD_DIR = ../bfd
BFD = $(BFD_DIR)/libbfd.a
@@ -271,7 +276,8 @@ INTERNAL_WARN_CFLAGS = \
$(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
$(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \
- $(INTL_CFLAGS) $(TUI_CFLAGS) $(ENABLE_CFLAGS) $(GDB_WARN_CFLAGS)
+ $(INTL_CFLAGS) $(TUI_CFLAGS) $(ENABLE_CFLAGS) \
+ $(REGEX_CFLAGS) $(GDB_WARN_CFLAGS)
INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
# LDFLAGS is specifically reserved for setting from the command line
@@ -283,11 +289,6 @@ INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS
INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS) @HLDFLAGS@
HLDENV = @HLDENV@
-# We are using our own version of REGEX now to be consistent across
-# machines.
-REGEX = gnu-regex.o
-REGEX1 = gnu-regex.o
-
# If your system is missing alloca(), or, more likely, it's there but
# it doesn't work, then refer to libiberty.
@@ -308,7 +309,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CD
$(OPCODES) $(MMALLOC) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS)
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
-ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
+ADD_DEPS = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
VERSION = 20000204
DIST=gdb
Index: configure.in
===================================================================
RCS file: /work/cvs/gnu/gdb/gdb/configure.in,v
retrieving revision 1.1.1.6
diff -u -p -r1.1.1.6 configure.in
--- configure.in 2000/03/07 18:42:10 1.1.1.6
+++ configure.in 2000/03/09 21:50:46
@@ -505,6 +505,36 @@ if test x$want_mmalloc = xtrue; then
MMALLOC='../mmalloc/libmmalloc.a'
fi
+AC_ARG_WITH(included-regex,
+[ --with-included-regex Use included regex],
+[case "${withval}" in
+ yes) want_included_regex=true ;;
+ no) want_included_regex=false;;
+ *) AC_MSG_ERROR(bad value ${withval} for GDB with-included-regex option) ;;
+esac],[want_included_regex=false])dnl
+
+REGEX="gnu-regex.o"
+REGEX_CFLAGS="-DUSE_INCLUDED_REGEX"
+if test $want_included_regex = false; then
+ AC_MSG_CHECKING(for GNU regex)
+ AC_CACHE_VAL(gdb_cv_have_gnu_regex,
+[AC_TRY_COMPILE([#include <gnu-versions.h>
+#include <sys/types.h>
+#include <regex.h>],
+[#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
+#error No valid GNU regex.
+#endif
+],
+ [gdb_cv_have_gnu_regex=yes],
+ [gdb_cv_have_gnu_regex=no])])
+ AC_MSG_RESULT($gdb_cv_have_gnu_regex)
+ if test $gdb_cv_have_gnu_regex = yes; then
+ REGEX=
+ REGEX_CFLAGS=
+ fi
+fi
+AC_SUBST(REGEX)
+AC_SUBST(REGEX_CFLAGS)
# In the Cygwin environment, we need some additional flags.
AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin,
--- /dev/null Tue May 5 13:32:27 1998
+++ gdb_regex.h Thu Mar 9 14:06:44 2000
@@ -0,0 +1,8 @@
+#ifndef _GDB_REGEX_H
+#define _GDB_REGEX_H
+#ifdef USE_INCLUDED_REGEX
+#include "gnu-regex.h"
+#else
+#include <regex.h>
+#endif
+#endif /* _GDB_REGEX_H */
From ezannoni@cygnus.com Thu Mar 09 15:01:00 2000
From: Elena Zannoni <ezannoni@cygnus.com>
To: gdb-patches@sourceware.cygnus.com
Subject: Mini patch
Date: Thu, 09 Mar 2000 15:01:00 -0000
Message-id: <14536.11577.901730.689173@kwikemart.cygnus.com>
X-SW-Source: 2000-03/msg00197.html
Content-length: 1290
I just checked this in.
Elena
Index: minsyms.c
===================================================================
RCS file: /cvs/src/src/gdb/minsyms.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -c -r1.2 -r1.3
*** minsyms.c 2000/03/07 04:33:52 1.2
--- minsyms.c 2000/03/09 22:58:49 1.3
***************
*** 667,672 ****
--- 667,674 ----
/* FIXME: This info, if it remains, needs its own field. */
MSYMBOL_INFO (msymbol) = info; /* FIXME! */
+ /* The hash pointers must be cleared! If they're not,
+ MSYMBOL_HASH_ADD will NOT add this msymbol to the hash table. */
msymbol->hash_next = NULL;
msymbol->demangled_hash_next = NULL;
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.120
retrieving revision 1.121
diff -c -r1.120 -r1.121
*** ChangeLog 2000/03/09 21:55:39 1.120
--- ChangeLog 2000/03/09 22:58:49 1.121
***************
*** 1,3 ****
--- 1,7 ----
+ 2000-03-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * minsyms.c (prim_record_minimal_symbol_and_info): Add comment.
+
2000-02-25 Scott Bambrough <scottb@netwinder.org>
* gdb.base/long_long.exp: Correct test suite failure when printing
From kingdon@redhat.com Thu Mar 09 15:23:00 2000
From: Jim Kingdon <kingdon@redhat.com>
To: Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE
Cc: kevinb@cygnus.com, Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE, gdb-patches@sourceware.cygnus.com
Subject: Re: RFA: solib.c: Clean fix to get rid of severe Solaris 2.7 sparc regressions
Date: Thu, 09 Mar 2000 15:23:00 -0000
Message-id: <200003092322.SAA01952@devserv.devel.redhat.com>
References: <200003090940.KAA32291@reisser.regent.e-technik.tu-muenchen.de>
X-SW-Source: 2000-03/msg00198.html
Content-length: 124
> Good idea, thanks. Here is a revised patch which gets rid of all
> CORE_ADDR pointer casts in solib.c.
Looks good to me.
From ac131313@cygnus.com Thu Mar 09 16:52:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: [MAINT] Devolve responsibilities
Date: Thu, 09 Mar 2000 16:52:00 -0000
Message-id: <38C84733.C86136C9@cygnus.com>
X-SW-Source: 2000-03/msg00199.html
Content-length: 1579
Just to close this, I've committed the attatched.
Andrew
Fri Mar 10 11:44:55 2000 Andrew Cagney <cagney@b1.cygnus.com>
* MAINTAINERS: Devolve responsibility for domain maintenance.
Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/gdb/MAINTAINERS,v
retrieving revision 1.22
diff -p -r1.22 MAINTAINERS
*** MAINTAINERS 2000/03/09 03:32:09 1.22
--- MAINTAINERS 2000/03/10 00:41:50
*************** Peter Schauer Peter.Schauer@regent.e-t
*** 14,27 ****
Note individuals who maintain parts of the debugger need approval to
check in changes outside of the immediate domain that they maintain.
! If there is no maintainer for a given domain then the problem falls to
! the head maintainer.
! If there are several maintainers for a given domain then the problem
! falls to the first maintainer. The second and third maintainers are
! firstly known to have expertise in the given domain and secondly are
! available to step in if the first maintainer is to be absent for any
! reason.
Target/Architecture:
--- 14,25 ----
Note individuals who maintain parts of the debugger need approval to
check in changes outside of the immediate domain that they maintain.
! If there is no maintainer for a given domain then the responsibility
! falls to the head maintainer.
! If there are several maintainers for a given domain then
! responsibility falls to the first maintainer. The first maintainer is
! free to devolve that responsibility among the other maintainers.
Target/Architecture:
From eliz@delorie.com Fri Mar 10 05:47:00 2000
From: Eli Zaretskii <eliz@delorie.com>
To: gdb-patches@sourceware.cygnus.com
Subject: [PATCH] GDB command-line switches and annotations docs
Date: Fri, 10 Mar 2000 05:47:00 -0000
Message-id: <200003101347.IAA21898@indy.delorie.com>
X-SW-Source: 2000-03/msg00200.html
Content-length: 25252
Here are patches to gdb.texinfo and annotate.texi which add indexing
to command-line switches, document some switches that were not in the
manual, and make annotate.texi part of GDB manual.
(Are there plans to make gdbmi.texi be part of the manual as well?)
--- gdb/doc/gdb.t~0 Tue Jan 18 03:15:04 2000
+++ gdb/doc/gdb.texinfo Fri Mar 10 15:27:42 2000
@@ -153,6 +153,7 @@
* Command Line Editing:: Command Line Editing
* Using History Interactively:: Using History Interactively
* Installing GDB:: Installing GDB
+* Annotations:: @value{GDBN}'s annotations interface.
* Index:: Index
@end menu
@@ -749,22 +750,34 @@
(If you prefer, you can flag option arguments with @samp{--} rather
than @samp{-}, though we illustrate the more usual convention.)
+@c NOTE: the @cindex entries here use double dashes (actually, triple
+@c dashes, but that's because of makeinfo formatting of indices) ON
+@c PURPOSE. This way, both those who look for -foo and --foo in the
+@c index, will find it.
+
@table @code
@item -symbols @var{file}
@itemx -s @var{file}
+@cindex ---symbols
+@cindex -s
Read symbol table from file @var{file}.
@item -exec @var{file}
@itemx -e @var{file}
+@cindex ---exec
+@cindex -e
Use file @var{file} as the executable file to execute when appropriate,
and for examining pure data in conjunction with a core dump.
@item -se @var{file}
+@cindex ---se
Read symbol table from file @var{file} and use it as the executable
file.
@item -core @var{file}
@itemx -c @var{file}
+@cindex ---core
+@cindex -c
Use file @var{file} as a core dump to examine.
@item -c @var{number}
@@ -774,15 +787,21 @@
@item -command @var{file}
@itemx -x @var{file}
+@cindex ---command
+@cindex -x
Execute @value{GDBN} commands from file @var{file}. @xref{Command
Files,, Command files}.
@item -directory @var{directory}
@itemx -d @var{directory}
+@cindex ---directory
+@cindex -d
Add @var{directory} to the path to search for source files.
@item -m
@itemx -mapped
+@cindex ---mapped
+@cindex -m
@emph{Warning: this option depends on operating system facilities that are not
supported on all systems.}@*
If memory-mapped files are available on your system through the @code{mmap}
@@ -800,6 +819,8 @@
@item -r
@itemx -readnow
+@cindex ---readnow
+@cindex -r
Read each symbol file's entire symbol table immediately, rather than
the default, which is to read it incrementally as it is needed.
This makes startup slower, but makes future operations faster.
@@ -825,6 +846,8 @@
@table @code
@item -nx
@itemx -n
+@cindex ---nx
+@cindex -n
Do not execute commands found in any initialization files (normally
called @file{.gdbinit}, or @file{gdb.ini} on PCs). Normally,
@value{GDBN} executes the commands in these files after all the command
@@ -832,11 +855,16 @@
files}.
@item -quiet
+@itemx -silent
@itemx -q
+@cindex ---quite
+@cindex ---silent
+@cindex -q
``Quiet''. Do not print the introductory and copyright messages. These
messages are also suppressed in batch mode.
@item -batch
+@cindex ---batch
Run in batch mode. Exit with status @code{0} after processing all the
command files specified with @samp{-x} (and all commands from
initialization files, if not inhibited with @samp{-n}). Exit with
@@ -858,21 +886,28 @@
@item -nowindows
@itemx -nw
+@cindex ---nowindows
+@cindex -nw
``No windows''. If @value{GDBN} comes with a graphical user interface
(GUI) built in, then this option tells GDB to only use the command-line
interface. If no GUI is available, this option has no effect.
@item -windows
@itemx -w
+@cindex ---windows
+@cindex -w
If @value{GDBN} includes a GUI, then this option requires it to be
used if possible.
@item -cd @var{directory}
+@cindex ---cd
Run @value{GDBN} using @var{directory} as its working directory,
instead of the current directory.
@item -fullname
@itemx -f
+@cindex ---fullname
+@cindex -f
@sc{gnu} Emacs sets this option when it runs @value{GDBN} as a
subprocess. It tells @value{GDBN} to output the full file name and line
number in a standard, recognizable fashion each time a stack frame is
@@ -883,17 +918,60 @@
@samp{\032} characters as a signal to display the source code for the
frame.
+@item -epoch
+@cindex ---epoch
+The Epoch Emacs-@value{GDBN} interface sets this option when it runs
+@value{GDBN} as a subprocess. It tells @value{GDBN} to modify its print
+routines so as to allow Epoch to display values of expressions in a
+separate window.
+
+@item -annotate @var{level}
+@cindex ---annotate
+This option sets the @dfn{annotation level} inside @value{GDBN}. Its
+effect is identical to using @samp{set annotate @var{level}}
+(@pxref{Annotations}).
+Annotation level controls how much information does @value{GDBN} print
+together with its prompt, values of expressions, source lines, and other
+types of output. Level 0 is the normal, level 1 is for use when
+@value{GDBN} is run as a subprocess of @sc{gnu} Emacs, level 2 is the
+maximum annotation suitable for programs that control @value{GDBN}.
+
+@item -async
+@cindex ---async
+Use the asynchronous event loop for the command-line interface.
+@value{GDBN} processes all events, such as user keyboard input, via a
+special event loop. This allows @value{GDBN} to accept and process user
+commands in parallel with the debugged process being
+run@footnote{@value{GDBN} built with @sc{djgpp} tools for
+MS-DOS/MS-Windows supports this mode of operation, but the event loop is
+suspended when the debuggee runs.}, so you don't need to wait for
+control to return to @value{GDBN} before you type the next command.
+
+When the standard input is connected to a terminal device, @value{GDBN}
+uses the asynchronous event loop by default, unless disabled by the
+@samp{-noasync} option.
+
+@item -noasync
+@cindex ---noasync
+Disable the asynchronous event loop for the command-line interface.
+
@item -baud @var{bps}
@itemx -b @var{bps}
+@cindex ---baud
+@cindex -b
Set the line speed (baud rate or bits per second) of any serial
interface used by @value{GDBN} for remote debugging.
@item -tty @var{device}
+@itemx -t @var{device}
+@cindex ---tty
+@cindex -t
Run using @var{device} for your program's standard input and output.
@c FIXME: kingdon thinks there is more to -tty. Investigate.
@c resolve the situation of these eventually
@c @item -tui
+@c @cindex ---tui
@c Use a Terminal User Interface. For information, use your Web browser to
@c read the file @file{TUI.html}, which is usually installed in the
@c directory @code{/opt/langtools/wdb/doc} on HP-UX systems. Do not use
@@ -901,11 +979,38 @@
@c @value{GDBN} under @sc{gnu} Emacs}).
@c @item -xdb
+@c @cindex ---xdb
@c Run in XDB compatibility mode, allowing the use of certain XDB commands.
@c For information, see the file @file{xdb_trans.html}, which is usually
@c installed in the directory @code{/opt/langtools/wdb/doc} on HP-UX
@c systems.
+@item -interpreter @var{interp}
+@cindex ---interpreter
+Use the interpreter @var{interp} for interface with the controlling
+program or device. This option is meant to be set by programs which
+communicate with @value{GDBN} using it as a back end. For example,
+@samp{--interpreter=mi} causes @value{GDBN} to use the @dfn{gdbmi
+interface}.
+@c FIXME: There should be an @xref here to the GDB/MI docs, but
+@c gdbmi.texi doesn't have a single node to reference!
+
+@item -write
+@cindex ---write
+Open the executable and core files for both reading and writing. This
+is equivalent to the @samp{set write on} command inside @value{GDBN}
+(@pxref{Patching}).
+
+@item -statistics
+@cindex ---statistics
+This option causes @value{GDBN} to print statistics about time and
+memory usage after it completes each command and returns to the prompt.
+
+@item -version
+@cindex ---version
+This option causes @value{GDBN} to print its version number and
+no-warranty blurb, and exit.
+
@end table
@node Quitting GDB
@@ -12488,6 +12593,8 @@
There are many other options available as well, but they are generally
needed for special purposes only.
+
+@include annotate.texi
@node Index
@unnumbered Index
--- gdb/doc/annotate.t~0 Fri Apr 16 03:54:46 1999
+++ gdb/doc/annotate.texi Fri Mar 10 11:53:06 2000
@@ -1,85 +1,93 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename annotate.info
-@settitle GDB Annotations
-@setchapternewpage off
-@c %**end of header
-
-@set EDITION 0.5
-@set DATE May 1994
-
-@ifinfo
-This file documents GDB annotations.
-
-This is Edition @value{EDITION}, @value{DATE}, of @cite{GDB
-Annotations}. Copyright 1994 Free Software Foundation
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-@ignore
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-
-@end ignore
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
-@end ifinfo
-
-@titlepage
-@title GDB Annotations
-@subtitle Edition @value{EDITION}
-@subtitle @value{DATE}
-@author Cygnus Support
-@page
-@vskip 0pt plus 1filll
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Copyright @copyright{} 1994 Free Software Foundation
-@end titlepage
-
-@ifinfo
-@node Top
-@top GDB Annotations
-
-This file describes annotations in GDB, the GNU symbolic debugger.
-Annotations are designed to interface GDB to graphical user interfaces
-or other similar programs which want to interact with GDB at a
+@c \input texinfo @c -*-texinfo-*-
+@c @c %**start of header
+@c @setfilename annotate.info
+@c @settitle GDB Annotations
+@c @setchapternewpage off
+@c @c %**end of header
+
+@c @set EDITION 0.5
+@c @set DATE May 1994
+
+@c @ifinfo
+@c This file documents GDB annotations.
+
+@c This is Edition @value{EDITION}, @value{DATE}, of @cite{GDB
+@c Annotations}. Copyright 1994 Free Software Foundation
+
+@c Permission is granted to make and distribute verbatim copies of
+@c this manual provided the copyright notice and this permission notice
+@c are preserved on all copies.
+@c @end ignore
+
+@c @ignore
+@c Permission is granted to process this file through TeX and print the
+@c results, provided the printed document carries copying permission
+@c notice identical to this one except for the removal of this paragraph
+@c (this paragraph not being relevant to the printed manual).
+
+@c @end ignore
+@c Permission is granted to copy and distribute modified versions of this
+@c manual under the conditions for verbatim copying, provided also that the
+@c entire resulting derived work is distributed under the terms of a
+@c permission notice identical to this one.
+
+@c Permission is granted to copy and distribute translations of this manual
+@c into another language, under the above conditions for modified versions.
+@c @end ifinfo
+
+@c @titlepage
+@c @title GDB Annotations
+@c @subtitle Edition @value{EDITION}
+@c @subtitle @value{DATE}
+@c @author Cygnus Support
+@c @page
+@c @vskip 0pt plus 1filll
+@c Permission is granted to make and distribute verbatim copies of
+@c this manual provided the copyright notice and this permission notice
+@c are preserved on all copies.
+
+@c Copyright @copyright{} 1994 Free Software Foundation
+@c @end titlepage
+
+@c @ifinfo
+@c @node Top
+@c @top GDB Annotations
+
+@syncodeindex fn cp
+
+@node Annotations
+@chapter @value{GDBN} Annotations
+
+This chapter describes annotations in @value{GDBN}, the GNU symbolic debugger.
+Annotations are designed to interface @value{GDBN} to graphical user interfaces
+or other similar programs which want to interact with @value{GDBN} at a
relatively high level.
+@ignore
This is Edition @value{EDITION}, @value{DATE}.
+@end ignore
@menu
-* General:: What annotations are; the general syntax.
-* Server:: Issuing a command without affecting user state.
-* Values:: Values are marked as such.
-* Frames:: Stack frames are annotated.
-* Displays:: GDB can be told to display something periodically.
-* Prompting:: Annotations marking GDB's need for input.
+* Annotations Overview:: What annotations are; the general syntax.
+* Server Prefix:: Issuing a command without affecting user state.
+* Value Annotations:: Values are marked as such.
+* Frame Annotations:: Stack frames are annotated.
+* Displays:: @value{GDBN} can be told to display something periodically.
+* Prompting:: Annotations marking @value{GDBN}'s need for input.
* Errors:: Annotations for error messages.
* Breakpoint Info:: Information on breakpoints.
* Invalidation:: Some annotations describe things now invalid.
-* Running:: Whether the program is running, how it stopped, etc.
-* Source:: Annotations describing source code.
+* Annotations for Running::
+ Whether the program is running, how it stopped, etc.
+* Source Annotations:: Annotations describing source code.
* TODO:: Annotations which might be added in the future.
-* Index:: Index
@end menu
-@end ifinfo
-@node General
-@chapter What is an Annotation?
+@node Annotations Overview
+@section What is an Annotation?
+@cindex annotations
-To produce annotations, start GDB with the @code{--annotate=2} option.
+To produce annotations, start @value{GDBN} with the @code{--annotate=2} option.
Annotations start with a newline character, two @samp{control-z}
characters, and the name of the annotation. If there is no additional
@@ -90,20 +98,22 @@
cannot contain newline characters.
Any output not beginning with a newline and two @samp{control-z}
-characters denotes literal output from GDB. Currently there is no need
-for GDB to output a newline followed by two @samp{control-z} characters,
+characters denotes literal output from @value{GDBN}. Currently there is no need
+for @value{GDBN} to output a newline followed by two @samp{control-z} characters,
but if there was such a need, the annotations could be extended with an
@samp{escape} annotation which means those three characters as output.
-A simple example of starting up GDB with annotations is:
+A simple example of starting up @value{GDBN} with annotations is:
-@example
+@smallexample
$ gdb --annotate=2
-GDB is free software and you are welcome to distribute copies of it
- under certain conditions; type "show copying" to see the conditions.
-There is absolutely no warranty for GDB; type "show warranty" for details.
-GDB 4.12.3 (sparc-sun-sunos4.1.3),
-Copyright 1994 Free Software Foundation, Inc.
+GNU GDB 5.0
+Copyright 1998 Free Software Foundation, Inc.
+GDB is free software, covered by the GNU General Public License, and you are
+welcome to change it and/or distribute copies of it under certain conditions.
+Type "show copying" to see the conditions.
+There is absolutely no warranty for GDB. Type "show warranty" for details.
+This GDB was configured as "sparc-sun-sunos4.1.3"
^Z^Zpre-prompt
(gdb)
@@ -112,29 +122,31 @@
^Z^Zpost-prompt
$
-@end example
+@end smallexample
-Here @samp{quit} is input to GDB; the rest is output from GDB. The three
+Here @samp{quit} is input to @value{GDBN}; the rest is output from @value{GDBN}. The three
lines beginning @samp{^Z^Z} (where @samp{^Z} denotes a @samp{control-z}
-character) are annotations; the rest is output from GDB.
+character) are annotations; the rest is output from @value{GDBN}.
-@node Server
-@chapter The Server Prefix
+@node Server Prefix
+@section The Server Prefix
+@cindex server prefix for annotations
-To issue a command to GDB without affecting certain aspects of the state
+To issue a command to @value{GDBN} without affecting certain aspects of the state
which is seen by users, prefix it with @samp{server }. This means that
this command will not affect the command history, nor will it affect
-GDB's notion of which command to repeat if @key{RET} is pressed on a
+@value{GDBN}'s notion of which command to repeat if @key{RET} is pressed on a
line by itself.
The server prefix does not affect the recording of values into the value
history; to print a value without recording it into the value history,
use the @code{output} command instead of the @code{print} command.
-@node Values
-@chapter Values
+@node Value Annotations
+@section Values
-When a value is printed in various contexts, GDB uses annotations to
+@cindex annotations for values
+When a value is printed in various contexts, @value{GDBN} uses annotations to
delimit the value from the surrounding text.
@findex value-history-begin
@@ -172,7 +184,7 @@
@findex arg-name-end
@findex arg-value
@findex arg-end
-When GDB prints an argument to a function (for example, in the output
+When @value{GDBN} prints an argument to a function (for example, in the output
from the @code{backtrace} command), it annotates it as follows:
@example
@@ -195,7 +207,7 @@
@findex field-name-end
@findex field-value
@findex field-end
-When printing a structure, GDB annotates it as follows:
+When printing a structure, @value{GDBN} annotates it as follows:
@example
^Z^Zfield-begin @var{value-flags}
@@ -212,7 +224,7 @@
(such as @samp{=}), and @var{value-flags} and @var{the-value} have the
same meanings as in a @code{value-history-begin} annotation.
-When printing an array, GDB annotates it as follows:
+When printing an array, @value{GDBN} annotates it as follows:
@example
^Z^Zarray-section-begin @var{array-index} @var{value-flags}
@@ -257,11 +269,12 @@
^Z^Zarray-section-end
@end example
-@node Frames
-@chapter Frames
+@node Frame Annotations
+@section Frames
-Whenever GDB prints a frame, it annotates it. For example, this applies
-to frames printed when GDB stops, output from commands such as
+@cindex annotations for frames
+Whenever @value{GDBN} prints a frame, it annotates it. For example, this applies
+to frames printed when @value{GDBN} stops, output from commands such as
@code{backtrace} or @code{up}, etc.
@findex frame-begin
@@ -296,7 +309,7 @@
@end example
where @var{function-call-string} is text designed to convey to the user
-that this frame is associated with a function call made by GDB to a
+that this frame is associated with a function call made by @value{GDBN} to a
function in the program being debugged.
@item
@@ -347,7 +360,7 @@
where @var{function-name} is the name of the function executing in the
frame, or @samp{??} if not known, and @var{arguments} are the arguments
to the frame, with parentheses around them (each argument is annotated
-individually as well @pxref{Values}).
+individually as well, @pxref{Value Annotations}).
@findex frame-source-begin
@findex frame-source-file
@@ -374,7 +387,7 @@
file (the first line is line 1).
@findex frame-where
-If GDB prints some information about where the frame is from (which
+If @value{GDBN} prints some information about where the frame is from (which
library, which load segment, etc.; currently only done on the RS/6000),
it is annotated with
@@ -391,7 +404,7 @@
@end itemize
@node Displays
-@chapter Displays
+@section Displays
@findex display-begin
@findex display-number-end
@@ -400,7 +413,8 @@
@findex display-expression-end
@findex display-value
@findex display-end
-When GDB is told to display something using the @code{display} command,
+@cindex annotations for display
+When @value{GDBN} is told to display something using the @code{display} command,
the results of the display are annotated:
@example
@@ -428,9 +442,10 @@
and @var{value} is the actual value being displayed.
@node Prompting
-@chapter Annotation for GDB Input
+@section Annotation for @value{GDBN} Input
-When GDB prompts for input, it annotates this fact so it is possible
+@cindex annotations for prompts
+When @value{GDBN} prompts for input, it annotates this fact so it is possible
to know when to send output, when the output from a given command is
over, etc.
@@ -455,60 +470,61 @@
@findex prompt
@findex post-prompt
@item prompt
-When GDB is prompting for a command (the main GDB prompt).
+When @value{GDBN} is prompting for a command (the main @value{GDBN} prompt).
@findex pre-commands
@findex commands
@findex post-commands
@item commands
-When GDB prompts for a set of commands, like in the @code{commands}
+When @value{GDBN} prompts for a set of commands, like in the @code{commands}
command. The annotations are repeated for each command which is input.
@findex pre-overload-choice
@findex overload-choice
@findex post-overload-choice
@item overload-choice
-When GDB wants the user to select between various overloaded functions.
+When @value{GDBN} wants the user to select between various overloaded functions.
@findex pre-query
@findex query
@findex post-query
@item query
-When GDB wants the user to confirm a potentially dangerous operation.
+When @value{GDBN} wants the user to confirm a potentially dangerous operation.
@findex pre-prompt-for-continue
@findex prompt-for-continue
@findex post-prompt-for-continue
@item prompt-for-continue
-When GDB is asking the user to press return to continue. Note: Don't
+When @value{GDBN} is asking the user to press return to continue. Note: Don't
expect this to work well; instead use @code{set height 0} to disable
prompting. This is because the counting of lines is buggy in the
presence of annotations.
@end table
@node Errors
-@chapter Errors
+@section Errors
+@cindex annotations for errors, warnings and interrupts
@findex quit
@example
^Z^Zquit
@end example
-This annotation occurs right before GDB responds to an interrupt.
+This annotation occurs right before @value{GDBN} responds to an interrupt.
@findex error
@example
^Z^Zerror
@end example
-This annotation occurs right before GDB responds to an error.
+This annotation occurs right before @value{GDBN} responds to an error.
-Quit and error annotations indicate that any annotations which GDB was
+Quit and error annotations indicate that any annotations which @value{GDBN} was
in the middle of may end abruptly. For example, if a
@code{value-history-begin} annotation is followed by a @code{error}, one
cannot expect to receive the matching @code{value-history-end}. One
cannot expect not to receive it either, however; an error annotation
-does not necessarily mean that GDB is immediately returning all the way
+does not necessarily mean that @value{GDBN} is immediately returning all the way
to the top level.
@findex error-begin
@@ -526,8 +542,9 @@
@c range_error(), and possibly other places.
@node Breakpoint Info
-@chapter Information on Breakpoints
+@section Information on Breakpoints
+@cindex annotations for breakpoints
The output from the @code{info breakpoints} command is annotated as follows:
@findex breakpoints-headers
@@ -582,8 +599,9 @@
@end example
@node Invalidation
-@chapter Invalidation Notices
+@section Invalidation Notices
+@cindex annotations for invalidation messages
The following annotations say that certain pieces of state may have
changed.
@@ -601,12 +619,13 @@
deleted a breakpoint.
@end table
-@node Running
-@chapter Running the Program
+@node Annotations for Running
+@section Running the Program
+@cindex annotations for running programs
@findex starting
@findex stopping
-When the program starts executing due to a GDB command such as
+When the program starts executing due to a @value{GDBN} command such as
@code{step} or @code{continue},
@example
@@ -657,7 +676,7 @@
@findex signal
@item ^Z^Zsignal
-The syntax of this annotation is just like @code{signalled}, but GDB is
+The syntax of this annotation is just like @code{signalled}, but @value{GDBN} is
just saying that the program received the signal, not that it was
terminated with it.
@@ -670,8 +689,9 @@
The program hit watchpoint number @var{number}.
@end table
-@node Source
-@chapter Displaying Source
+@node Source Annotations
+@section Displaying Source
+@cindex annotations for source display
@findex source
The following annotation is used instead of displaying source code:
@@ -693,7 +713,7 @@
depend on the language).
@node TODO
-@chapter Annotations We Might Want in the Future
+@section Annotations We Might Want in the Future
@format
- target-invalid
@@ -709,9 +729,11 @@
notices.
@end format
+@ignore
@node Index
@unnumbered Index
@printindex fn
+@end ignore
-@bye
+@c @bye
From kingdon@redhat.com Fri Mar 10 06:16:00 2000
From: Jim Kingdon <kingdon@redhat.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH] GDB command-line switches and annotations docs
Date: Fri, 10 Mar 2000 06:16:00 -0000
Message-id: <bwvnauczt.fsf@rtl.cygnus.com>
References: <200003101347.IAA21898@indy.delorie.com>
X-SW-Source: 2000-03/msg00201.html
Content-length: 508
> +@c NOTE: the @cindex entries here use double dashes (actually, triple
> +@c dashes, but that's because of makeinfo formatting of indices) ON
The way to handle the makeinfo formatting issue is "@cindex
@code{--test}" rather than "@cindex ---test"; the latter is an em dash
in the printed manual rather than two "-" characters. I just tried
the former in both info and TeX and it seems to do the right thing.
> +@cindex ---quite
Typo ("quite" should be "quiet").
Other than that I didn't see problems.
From ezannoni@cygnus.com Fri Mar 10 07:24:00 2000
From: Elena Zannoni <ezannoni@cygnus.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH] GDB command-line switches and annotations docs
Date: Fri, 10 Mar 2000 07:24:00 -0000
Message-id: <14537.5048.99180.910863@kwikemart.cygnus.com>
References: <200003101347.IAA21898@indy.delorie.com>
X-SW-Source: 2000-03/msg00202.html
Content-length: 2075
Eli Zaretskii writes:
>
> Here are patches to gdb.texinfo and annotate.texi which add indexing
> to command-line switches, document some switches that were not in the
> manual, and make annotate.texi part of GDB manual.
>
> (Are there plans to make gdbmi.texi be part of the manual as well?)
>
Eventually yes (Andrew?), right now it is not in prime time form yet. It is
still very rough work in progress.
> +
> +@item -async
> +@cindex ---async
> +Use the asynchronous event loop for the command-line interface.
> +@value{GDBN} processes all events, such as user keyboard input, via a
> +special event loop. This allows @value{GDBN} to accept and process user
> +commands in parallel with the debugged process being
> +run@footnote{@value{GDBN} built with @sc{djgpp} tools for
> +MS-DOS/MS-Windows supports this mode of operation, but the event loop is
> +suspended when the debuggee runs.}, so you don't need to wait for
> +control to return to @value{GDBN} before you type the next command.
> +
> +When the standard input is connected to a terminal device, @value{GDBN}
> +uses the asynchronous event loop by default, unless disabled by the
> +@samp{-noasync} option.
> +
> +@item -noasync
> +@cindex ---noasync
> +Disable the asynchronous event loop for the command-line interface.
> +
I was planning on removing the -async option, it is now redundant.
Maybe I should just go ahead and do it now.
The --noasync stays there for the moment but my hope is that it will
eventually not be necessary anymore. As far as the footnote goes,
that behavior is what you get in all the platforms and configurations
at the moment not just djgpp. The target side is not hooked up to the
event loop yet (except for a 'clone' of the remote target, called
'async'). So I would modify the above entry to specify that the event
loop right now involves only user events, not target ones. Eventually
it will deal with target side too, but each target needs to be
converted. The behavior you describe is the ultimate goal, we are only
about 50% there.
Elena
From scottb@netwinder.org Fri Mar 10 07:47:00 2000
From: Scott Bambrough <scottb@netwinder.org>
To: Michael Snyder <msnyder@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: store_floating() and arm-tdep.c
Date: Fri, 10 Mar 2000 07:47:00 -0000
Message-id: <38C917C1.3E6E2C19@netwinder.org>
References: <1000229000345.ZM15006@ocotillo.lan> <38BCE46B.CD7889B5@cygnus.com> <1000302074643.ZM19182@ocotillo.lan> <38C7BF53.731F8CF6@redhat.com> <38C7C9A4.3566EC87@netwinder.org> <38C7F23D.61AF@cygnus.com>
X-SW-Source: 2000-03/msg00203.html
Content-length: 1429
> Scott Bambrough wrote:
> >
> > I've been running tests on the ARM Linux target on a NetWinder regularly. The
> > results of the testsuite follow. Most of the problems are due to no
> > linuxthreads support and problems stepping in/out or backtracing in signal
> > handlers. I'll work at implementing support for these over time. I was hoping
> > to port the x86 work, but just haven't had the time.
>
Michael Snyder wrote:
>
> Hmm, the new thread_db module should be pretty
> target-independent (correct me if I'm wrong).
Ok. I attempted to put the linuxthreads support in last night. It was
relatively painless, but I have reached a stumbling block with glibc 2.1.2. In
gdb_proc_service.h there are the following two definitions:
#ifndef HAVE_PRGREGSET_T
typedef gregset_t prgregset_t; /* BOGUS BOGUS BOGUS */
#endif
#ifndef HAVE_PRFPREGSET_T
typedef fpregset_t prfpregset_t; /* BOGUS BOGUS BOGUS */
#endif
The BOGUS comments are accurate. Neither gregset_t or fpregset_t are defined in
<sys/procfs.h>. prgregset_t and prfpregset_t are also used in gdb_threads_db.h
as well without checking the defines from config.h. I'm trying this on 2.1.3
ATM, but for the most part, the installed base of users is using 2.1.2 on ARM
Linux. Any thoughts on how I could get around this?
Scott
--
Scott Bambrough - Software Engineer
REBEL.COM http://www.rebel.com
NetWinder http://www.netwinder.org
From cgf@cygnus.com Fri Mar 10 09:31:00 2000
From: Chris Faylor <cgf@cygnus.com>
To: gdb-patches@sourceware.cygnus.com
Subject: Re: [robert.melchers@drives.eurotherm.co.uk: set architecture sh2, causes core dump on latest build 20000305.]
Date: Fri, 10 Mar 2000 09:31:00 -0000
Message-id: <20000310123052.I7903@cygnus.com>
X-SW-Source: 2000-03/msg00204.html
Content-length: 1309
This was sent to the insight mailing list. Does it look correct?
cgf
----- Forwarded message from Robert <robert.melchers@drives.eurotherm.co.uk> -----
From: "Robert" <robert.melchers@drives.eurotherm.co.uk>
To: <insight@sourceware.cygnus.com>
Subject: set architecture sh2, causes core dump on latest build 20000305.
Date: Fri, 10 Mar 2000 10:09:12 -0000
Importance: Normal
With GNU gdb 20000305 "--host=i686-pc-cygwin --target=sh-coff" the command "set architecture sh2",
causes a core dump.
I believe it is because the sh_processor_type_table[] in sh-tdep.c does not include an entry for the
sh2. Adding an entry fixes the problem.
The sh1 and sh2 processors share the same register names.
The following snippet shows the necessary changes.
Robert.
*** sh-tdep.bak Thu Feb 24 03:31:45 2000
--- sh-tdep.c Thu Mar 09 17:10:05 2000
***************
*** 102,115 ****
--- 102,119 ----
sh_processor_type_table[] =
{
{
sh_reg_names, bfd_mach_sh
}
,
{
+ sh_reg_names, bfd_mach_sh2
+ }
+ ,
+ {
sh3_reg_names, bfd_mach_sh3
}
,
{
sh3e_reg_names, bfd_mach_sh3e
}
,
----- End forwarded message -----
--
cgf@cygnus.com Cygnus Solutions, a Red Hat company
http://sourcware.cygnus.com/ http://www.redhat.com/
From eliz@delorie.com Fri Mar 10 09:43:00 2000
From: Eli Zaretskii <eliz@delorie.com>
To: kingdon@redhat.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH] GDB command-line switches and annotations docs
Date: Fri, 10 Mar 2000 09:43:00 -0000
Message-id: <200003101742.MAA22063@indy.delorie.com>
References: <200003101347.IAA21898@indy.delorie.com> <bwvnauczt.fsf@rtl.cygnus.com>
X-SW-Source: 2000-03/msg00205.html
Content-length: 25651
> > +@c NOTE: the @cindex entries here use double dashes (actually, triple
> > +@c dashes, but that's because of makeinfo formatting of indices) ON
>
> The way to handle the makeinfo formatting issue is "@cindex
> @code{--test}" rather than "@cindex ---test"; the latter is an em dash
> in the printed manual rather than two "-" characters.
Here are the revised changes. I converted all the "@cindex -x"
entries to the "@cindex @code{-x}" as well, for typeface uniformity.
--- gdb/doc/gdb.t~0 Tue Jan 18 03:15:04 2000
+++ gdb/doc/gdb.texinfo Fri Mar 10 16:39:30 2000
@@ -153,6 +153,7 @@
* Command Line Editing:: Command Line Editing
* Using History Interactively:: Using History Interactively
* Installing GDB:: Installing GDB
+* Annotations:: @value{GDBN}'s annotations interface.
* Index:: Index
@end menu
@@ -749,22 +750,33 @@
(If you prefer, you can flag option arguments with @samp{--} rather
than @samp{-}, though we illustrate the more usual convention.)
+@c NOTE: the @cindex entries here use double dashes ON PURPOSE. This
+@c way, both those who look for -foo and --foo in the index, will find
+@c it.
+
@table @code
@item -symbols @var{file}
@itemx -s @var{file}
+@cindex @code{--symbols}
+@cindex @code{-s}
Read symbol table from file @var{file}.
@item -exec @var{file}
@itemx -e @var{file}
+@cindex @code{--exec}
+@cindex @code{-e}
Use file @var{file} as the executable file to execute when appropriate,
and for examining pure data in conjunction with a core dump.
@item -se @var{file}
+@cindex @code{--se}
Read symbol table from file @var{file} and use it as the executable
file.
@item -core @var{file}
@itemx -c @var{file}
+@cindex @code{--core}
+@cindex @code{-c}
Use file @var{file} as a core dump to examine.
@item -c @var{number}
@@ -774,15 +786,21 @@
@item -command @var{file}
@itemx -x @var{file}
+@cindex @code{--command}
+@cindex @code{-x}
Execute @value{GDBN} commands from file @var{file}. @xref{Command
Files,, Command files}.
@item -directory @var{directory}
@itemx -d @var{directory}
+@cindex @code{--directory}
+@cindex @code{-d}
Add @var{directory} to the path to search for source files.
@item -m
@itemx -mapped
+@cindex @code{--mapped}
+@cindex @code{-m}
@emph{Warning: this option depends on operating system facilities that are not
supported on all systems.}@*
If memory-mapped files are available on your system through the @code{mmap}
@@ -800,6 +818,8 @@
@item -r
@itemx -readnow
+@cindex @code{--readnow}
+@cindex @code{-r}
Read each symbol file's entire symbol table immediately, rather than
the default, which is to read it incrementally as it is needed.
This makes startup slower, but makes future operations faster.
@@ -825,6 +845,8 @@
@table @code
@item -nx
@itemx -n
+@cindex @code{--nx}
+@cindex @code{-n}
Do not execute commands found in any initialization files (normally
called @file{.gdbinit}, or @file{gdb.ini} on PCs). Normally,
@value{GDBN} executes the commands in these files after all the command
@@ -832,11 +854,16 @@
files}.
@item -quiet
+@itemx -silent
@itemx -q
+@cindex @code{--quiet}
+@cindex @code{--silent}
+@cindex @code{-q}
``Quiet''. Do not print the introductory and copyright messages. These
messages are also suppressed in batch mode.
@item -batch
+@cindex @code{--batch}
Run in batch mode. Exit with status @code{0} after processing all the
command files specified with @samp{-x} (and all commands from
initialization files, if not inhibited with @samp{-n}). Exit with
@@ -858,21 +885,28 @@
@item -nowindows
@itemx -nw
+@cindex @code{--nowindows}
+@cindex @code{-nw}
``No windows''. If @value{GDBN} comes with a graphical user interface
(GUI) built in, then this option tells GDB to only use the command-line
interface. If no GUI is available, this option has no effect.
@item -windows
@itemx -w
+@cindex @code{--windows}
+@cindex @code{-w}
If @value{GDBN} includes a GUI, then this option requires it to be
used if possible.
@item -cd @var{directory}
+@cindex @code{--cd}
Run @value{GDBN} using @var{directory} as its working directory,
instead of the current directory.
@item -fullname
@itemx -f
+@cindex @code{--fullname}
+@cindex @code{-f}
@sc{gnu} Emacs sets this option when it runs @value{GDBN} as a
subprocess. It tells @value{GDBN} to output the full file name and line
number in a standard, recognizable fashion each time a stack frame is
@@ -883,17 +917,60 @@
@samp{\032} characters as a signal to display the source code for the
frame.
+@item -epoch
+@cindex @code{--epoch}
+The Epoch Emacs-@value{GDBN} interface sets this option when it runs
+@value{GDBN} as a subprocess. It tells @value{GDBN} to modify its print
+routines so as to allow Epoch to display values of expressions in a
+separate window.
+
+@item -annotate @var{level}
+@cindex @code{--annotate}
+This option sets the @dfn{annotation level} inside @value{GDBN}. Its
+effect is identical to using @samp{set annotate @var{level}}
+(@pxref{Annotations}).
+Annotation level controls how much information does @value{GDBN} print
+together with its prompt, values of expressions, source lines, and other
+types of output. Level 0 is the normal, level 1 is for use when
+@value{GDBN} is run as a subprocess of @sc{gnu} Emacs, level 2 is the
+maximum annotation suitable for programs that control @value{GDBN}.
+
+@item -async
+@cindex @code{--async}
+Use the asynchronous event loop for the command-line interface.
+@value{GDBN} processes all events, such as user keyboard input, via a
+special event loop. This allows @value{GDBN} to accept and process user
+commands in parallel with the debugged process being
+run@footnote{@value{GDBN} built with @sc{djgpp} tools for
+MS-DOS/MS-Windows supports this mode of operation, but the event loop is
+suspended when the debuggee runs.}, so you don't need to wait for
+control to return to @value{GDBN} before you type the next command.
+
+When the standard input is connected to a terminal device, @value{GDBN}
+uses the asynchronous event loop by default, unless disabled by the
+@samp{-noasync} option.
+
+@item -noasync
+@cindex @code{--noasync}
+Disable the asynchronous event loop for the command-line interface.
+
@item -baud @var{bps}
@itemx -b @var{bps}
+@cindex @code{--baud}
+@cindex @code{-b}
Set the line speed (baud rate or bits per second) of any serial
interface used by @value{GDBN} for remote debugging.
@item -tty @var{device}
+@itemx -t @var{device}
+@cindex @code{--tty}
+@cindex @code{-t}
Run using @var{device} for your program's standard input and output.
@c FIXME: kingdon thinks there is more to -tty. Investigate.
@c resolve the situation of these eventually
@c @item -tui
+@c @cindex @code{--tui}
@c Use a Terminal User Interface. For information, use your Web browser to
@c read the file @file{TUI.html}, which is usually installed in the
@c directory @code{/opt/langtools/wdb/doc} on HP-UX systems. Do not use
@@ -901,11 +978,38 @@
@c @value{GDBN} under @sc{gnu} Emacs}).
@c @item -xdb
+@c @cindex @code{--xdb}
@c Run in XDB compatibility mode, allowing the use of certain XDB commands.
@c For information, see the file @file{xdb_trans.html}, which is usually
@c installed in the directory @code{/opt/langtools/wdb/doc} on HP-UX
@c systems.
+@item -interpreter @var{interp}
+@cindex @code{--interpreter}
+Use the interpreter @var{interp} for interface with the controlling
+program or device. This option is meant to be set by programs which
+communicate with @value{GDBN} using it as a back end. For example,
+@samp{--interpreter=mi} causes @value{GDBN} to use the @dfn{gdbmi
+interface}.
+@c FIXME: There should be an @xref here to the GDB/MI docs, but
+@c gdbmi.texi doesn't have a single node to reference!
+
+@item -write
+@cindex @code{--write}
+Open the executable and core files for both reading and writing. This
+is equivalent to the @samp{set write on} command inside @value{GDBN}
+(@pxref{Patching}).
+
+@item -statistics
+@cindex @code{--statistics}
+This option causes @value{GDBN} to print statistics about time and
+memory usage after it completes each command and returns to the prompt.
+
+@item -version
+@cindex @code{--version}
+This option causes @value{GDBN} to print its version number and
+no-warranty blurb, and exit.
+
@end table
@node Quitting GDB
@@ -12488,6 +12592,8 @@
There are many other options available as well, but they are generally
needed for special purposes only.
+
+@include annotate.texi
@node Index
@unnumbered Index
--- gdb/doc/annotate.t~0 Fri Apr 16 03:54:46 1999
+++ gdb/doc/annotate.texi Fri Mar 10 11:53:06 2000
@@ -1,85 +1,93 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename annotate.info
-@settitle GDB Annotations
-@setchapternewpage off
-@c %**end of header
-
-@set EDITION 0.5
-@set DATE May 1994
-
-@ifinfo
-This file documents GDB annotations.
-
-This is Edition @value{EDITION}, @value{DATE}, of @cite{GDB
-Annotations}. Copyright 1994 Free Software Foundation
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-@ignore
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-
-@end ignore
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
-@end ifinfo
-
-@titlepage
-@title GDB Annotations
-@subtitle Edition @value{EDITION}
-@subtitle @value{DATE}
-@author Cygnus Support
-@page
-@vskip 0pt plus 1filll
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Copyright @copyright{} 1994 Free Software Foundation
-@end titlepage
-
-@ifinfo
-@node Top
-@top GDB Annotations
-
-This file describes annotations in GDB, the GNU symbolic debugger.
-Annotations are designed to interface GDB to graphical user interfaces
-or other similar programs which want to interact with GDB at a
+@c \input texinfo @c -*-texinfo-*-
+@c @c %**start of header
+@c @setfilename annotate.info
+@c @settitle GDB Annotations
+@c @setchapternewpage off
+@c @c %**end of header
+
+@c @set EDITION 0.5
+@c @set DATE May 1994
+
+@c @ifinfo
+@c This file documents GDB annotations.
+
+@c This is Edition @value{EDITION}, @value{DATE}, of @cite{GDB
+@c Annotations}. Copyright 1994 Free Software Foundation
+
+@c Permission is granted to make and distribute verbatim copies of
+@c this manual provided the copyright notice and this permission notice
+@c are preserved on all copies.
+@c @end ignore
+
+@c @ignore
+@c Permission is granted to process this file through TeX and print the
+@c results, provided the printed document carries copying permission
+@c notice identical to this one except for the removal of this paragraph
+@c (this paragraph not being relevant to the printed manual).
+
+@c @end ignore
+@c Permission is granted to copy and distribute modified versions of this
+@c manual under the conditions for verbatim copying, provided also that the
+@c entire resulting derived work is distributed under the terms of a
+@c permission notice identical to this one.
+
+@c Permission is granted to copy and distribute translations of this manual
+@c into another language, under the above conditions for modified versions.
+@c @end ifinfo
+
+@c @titlepage
+@c @title GDB Annotations
+@c @subtitle Edition @value{EDITION}
+@c @subtitle @value{DATE}
+@c @author Cygnus Support
+@c @page
+@c @vskip 0pt plus 1filll
+@c Permission is granted to make and distribute verbatim copies of
+@c this manual provided the copyright notice and this permission notice
+@c are preserved on all copies.
+
+@c Copyright @copyright{} 1994 Free Software Foundation
+@c @end titlepage
+
+@c @ifinfo
+@c @node Top
+@c @top GDB Annotations
+
+@syncodeindex fn cp
+
+@node Annotations
+@chapter @value{GDBN} Annotations
+
+This chapter describes annotations in @value{GDBN}, the GNU symbolic debugger.
+Annotations are designed to interface @value{GDBN} to graphical user interfaces
+or other similar programs which want to interact with @value{GDBN} at a
relatively high level.
+@ignore
This is Edition @value{EDITION}, @value{DATE}.
+@end ignore
@menu
-* General:: What annotations are; the general syntax.
-* Server:: Issuing a command without affecting user state.
-* Values:: Values are marked as such.
-* Frames:: Stack frames are annotated.
-* Displays:: GDB can be told to display something periodically.
-* Prompting:: Annotations marking GDB's need for input.
+* Annotations Overview:: What annotations are; the general syntax.
+* Server Prefix:: Issuing a command without affecting user state.
+* Value Annotations:: Values are marked as such.
+* Frame Annotations:: Stack frames are annotated.
+* Displays:: @value{GDBN} can be told to display something periodically.
+* Prompting:: Annotations marking @value{GDBN}'s need for input.
* Errors:: Annotations for error messages.
* Breakpoint Info:: Information on breakpoints.
* Invalidation:: Some annotations describe things now invalid.
-* Running:: Whether the program is running, how it stopped, etc.
-* Source:: Annotations describing source code.
+* Annotations for Running::
+ Whether the program is running, how it stopped, etc.
+* Source Annotations:: Annotations describing source code.
* TODO:: Annotations which might be added in the future.
-* Index:: Index
@end menu
-@end ifinfo
-@node General
-@chapter What is an Annotation?
+@node Annotations Overview
+@section What is an Annotation?
+@cindex annotations
-To produce annotations, start GDB with the @code{--annotate=2} option.
+To produce annotations, start @value{GDBN} with the @code{--annotate=2} option.
Annotations start with a newline character, two @samp{control-z}
characters, and the name of the annotation. If there is no additional
@@ -90,20 +98,22 @@
cannot contain newline characters.
Any output not beginning with a newline and two @samp{control-z}
-characters denotes literal output from GDB. Currently there is no need
-for GDB to output a newline followed by two @samp{control-z} characters,
+characters denotes literal output from @value{GDBN}. Currently there is no need
+for @value{GDBN} to output a newline followed by two @samp{control-z} characters,
but if there was such a need, the annotations could be extended with an
@samp{escape} annotation which means those three characters as output.
-A simple example of starting up GDB with annotations is:
+A simple example of starting up @value{GDBN} with annotations is:
-@example
+@smallexample
$ gdb --annotate=2
-GDB is free software and you are welcome to distribute copies of it
- under certain conditions; type "show copying" to see the conditions.
-There is absolutely no warranty for GDB; type "show warranty" for details.
-GDB 4.12.3 (sparc-sun-sunos4.1.3),
-Copyright 1994 Free Software Foundation, Inc.
+GNU GDB 5.0
+Copyright 1998 Free Software Foundation, Inc.
+GDB is free software, covered by the GNU General Public License, and you are
+welcome to change it and/or distribute copies of it under certain conditions.
+Type "show copying" to see the conditions.
+There is absolutely no warranty for GDB. Type "show warranty" for details.
+This GDB was configured as "sparc-sun-sunos4.1.3"
^Z^Zpre-prompt
(gdb)
@@ -112,29 +122,31 @@
^Z^Zpost-prompt
$
-@end example
+@end smallexample
-Here @samp{quit} is input to GDB; the rest is output from GDB. The three
+Here @samp{quit} is input to @value{GDBN}; the rest is output from @value{GDBN}. The three
lines beginning @samp{^Z^Z} (where @samp{^Z} denotes a @samp{control-z}
-character) are annotations; the rest is output from GDB.
+character) are annotations; the rest is output from @value{GDBN}.
-@node Server
-@chapter The Server Prefix
+@node Server Prefix
+@section The Server Prefix
+@cindex server prefix for annotations
-To issue a command to GDB without affecting certain aspects of the state
+To issue a command to @value{GDBN} without affecting certain aspects of the state
which is seen by users, prefix it with @samp{server }. This means that
this command will not affect the command history, nor will it affect
-GDB's notion of which command to repeat if @key{RET} is pressed on a
+@value{GDBN}'s notion of which command to repeat if @key{RET} is pressed on a
line by itself.
The server prefix does not affect the recording of values into the value
history; to print a value without recording it into the value history,
use the @code{output} command instead of the @code{print} command.
-@node Values
-@chapter Values
+@node Value Annotations
+@section Values
-When a value is printed in various contexts, GDB uses annotations to
+@cindex annotations for values
+When a value is printed in various contexts, @value{GDBN} uses annotations to
delimit the value from the surrounding text.
@findex value-history-begin
@@ -172,7 +184,7 @@
@findex arg-name-end
@findex arg-value
@findex arg-end
-When GDB prints an argument to a function (for example, in the output
+When @value{GDBN} prints an argument to a function (for example, in the output
from the @code{backtrace} command), it annotates it as follows:
@example
@@ -195,7 +207,7 @@
@findex field-name-end
@findex field-value
@findex field-end
-When printing a structure, GDB annotates it as follows:
+When printing a structure, @value{GDBN} annotates it as follows:
@example
^Z^Zfield-begin @var{value-flags}
@@ -212,7 +224,7 @@
(such as @samp{=}), and @var{value-flags} and @var{the-value} have the
same meanings as in a @code{value-history-begin} annotation.
-When printing an array, GDB annotates it as follows:
+When printing an array, @value{GDBN} annotates it as follows:
@example
^Z^Zarray-section-begin @var{array-index} @var{value-flags}
@@ -257,11 +269,12 @@
^Z^Zarray-section-end
@end example
-@node Frames
-@chapter Frames
+@node Frame Annotations
+@section Frames
-Whenever GDB prints a frame, it annotates it. For example, this applies
-to frames printed when GDB stops, output from commands such as
+@cindex annotations for frames
+Whenever @value{GDBN} prints a frame, it annotates it. For example, this applies
+to frames printed when @value{GDBN} stops, output from commands such as
@code{backtrace} or @code{up}, etc.
@findex frame-begin
@@ -296,7 +309,7 @@
@end example
where @var{function-call-string} is text designed to convey to the user
-that this frame is associated with a function call made by GDB to a
+that this frame is associated with a function call made by @value{GDBN} to a
function in the program being debugged.
@item
@@ -347,7 +360,7 @@
where @var{function-name} is the name of the function executing in the
frame, or @samp{??} if not known, and @var{arguments} are the arguments
to the frame, with parentheses around them (each argument is annotated
-individually as well @pxref{Values}).
+individually as well, @pxref{Value Annotations}).
@findex frame-source-begin
@findex frame-source-file
@@ -374,7 +387,7 @@
file (the first line is line 1).
@findex frame-where
-If GDB prints some information about where the frame is from (which
+If @value{GDBN} prints some information about where the frame is from (which
library, which load segment, etc.; currently only done on the RS/6000),
it is annotated with
@@ -391,7 +404,7 @@
@end itemize
@node Displays
-@chapter Displays
+@section Displays
@findex display-begin
@findex display-number-end
@@ -400,7 +413,8 @@
@findex display-expression-end
@findex display-value
@findex display-end
-When GDB is told to display something using the @code{display} command,
+@cindex annotations for display
+When @value{GDBN} is told to display something using the @code{display} command,
the results of the display are annotated:
@example
@@ -428,9 +442,10 @@
and @var{value} is the actual value being displayed.
@node Prompting
-@chapter Annotation for GDB Input
+@section Annotation for @value{GDBN} Input
-When GDB prompts for input, it annotates this fact so it is possible
+@cindex annotations for prompts
+When @value{GDBN} prompts for input, it annotates this fact so it is possible
to know when to send output, when the output from a given command is
over, etc.
@@ -455,60 +470,61 @@
@findex prompt
@findex post-prompt
@item prompt
-When GDB is prompting for a command (the main GDB prompt).
+When @value{GDBN} is prompting for a command (the main @value{GDBN} prompt).
@findex pre-commands
@findex commands
@findex post-commands
@item commands
-When GDB prompts for a set of commands, like in the @code{commands}
+When @value{GDBN} prompts for a set of commands, like in the @code{commands}
command. The annotations are repeated for each command which is input.
@findex pre-overload-choice
@findex overload-choice
@findex post-overload-choice
@item overload-choice
-When GDB wants the user to select between various overloaded functions.
+When @value{GDBN} wants the user to select between various overloaded functions.
@findex pre-query
@findex query
@findex post-query
@item query
-When GDB wants the user to confirm a potentially dangerous operation.
+When @value{GDBN} wants the user to confirm a potentially dangerous operation.
@findex pre-prompt-for-continue
@findex prompt-for-continue
@findex post-prompt-for-continue
@item prompt-for-continue
-When GDB is asking the user to press return to continue. Note: Don't
+When @value{GDBN} is asking the user to press return to continue. Note: Don't
expect this to work well; instead use @code{set height 0} to disable
prompting. This is because the counting of lines is buggy in the
presence of annotations.
@end table
@node Errors
-@chapter Errors
+@section Errors
+@cindex annotations for errors, warnings and interrupts
@findex quit
@example
^Z^Zquit
@end example
-This annotation occurs right before GDB responds to an interrupt.
+This annotation occurs right before @value{GDBN} responds to an interrupt.
@findex error
@example
^Z^Zerror
@end example
-This annotation occurs right before GDB responds to an error.
+This annotation occurs right before @value{GDBN} responds to an error.
-Quit and error annotations indicate that any annotations which GDB was
+Quit and error annotations indicate that any annotations which @value{GDBN} was
in the middle of may end abruptly. For example, if a
@code{value-history-begin} annotation is followed by a @code{error}, one
cannot expect to receive the matching @code{value-history-end}. One
cannot expect not to receive it either, however; an error annotation
-does not necessarily mean that GDB is immediately returning all the way
+does not necessarily mean that @value{GDBN} is immediately returning all the way
to the top level.
@findex error-begin
@@ -526,8 +542,9 @@
@c range_error(), and possibly other places.
@node Breakpoint Info
-@chapter Information on Breakpoints
+@section Information on Breakpoints
+@cindex annotations for breakpoints
The output from the @code{info breakpoints} command is annotated as follows:
@findex breakpoints-headers
@@ -582,8 +599,9 @@
@end example
@node Invalidation
-@chapter Invalidation Notices
+@section Invalidation Notices
+@cindex annotations for invalidation messages
The following annotations say that certain pieces of state may have
changed.
@@ -601,12 +619,13 @@
deleted a breakpoint.
@end table
-@node Running
-@chapter Running the Program
+@node Annotations for Running
+@section Running the Program
+@cindex annotations for running programs
@findex starting
@findex stopping
-When the program starts executing due to a GDB command such as
+When the program starts executing due to a @value{GDBN} command such as
@code{step} or @code{continue},
@example
@@ -657,7 +676,7 @@
@findex signal
@item ^Z^Zsignal
-The syntax of this annotation is just like @code{signalled}, but GDB is
+The syntax of this annotation is just like @code{signalled}, but @value{GDBN} is
just saying that the program received the signal, not that it was
terminated with it.
@@ -670,8 +689,9 @@
The program hit watchpoint number @var{number}.
@end table
-@node Source
-@chapter Displaying Source
+@node Source Annotations
+@section Displaying Source
+@cindex annotations for source display
@findex source
The following annotation is used instead of displaying source code:
@@ -693,7 +713,7 @@
depend on the language).
@node TODO
-@chapter Annotations We Might Want in the Future
+@section Annotations We Might Want in the Future
@format
- target-invalid
@@ -709,9 +729,11 @@
notices.
@end format
+@ignore
@node Index
@unnumbered Index
@printindex fn
+@end ignore
-@bye
+@c @bye
From eliz@delorie.com Fri Mar 10 10:09:00 2000
From: Eli Zaretskii <eliz@delorie.com>
To: Elena Zannoni <ezannoni@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH] GDB command-line switches and annotations docs
Date: Fri, 10 Mar 2000 10:09:00 -0000
Message-id: <200003101809.NAA22092@indy.delorie.com>
References: <14537.5048.99180.910863@kwikemart.cygnus.com>
X-SW-Source: 2000-03/msg00206.html
Content-length: 1342
Elena Zannoni writes:
> > (Are there plans to make gdbmi.texi be part of the manual as well?)
> >
>
> Eventually yes (Andrew?), right now it is not in prime time form yet. It is
> still very rough work in progress.
IMHO, it is much better to link between the two right now, and make
any necessary corrections later. As far as I could see, gdbmi.texi is
in quite a good shape, it just lacks a few menus and @node lines to
make it a valid Texinfo file. Most of the work can be done in Emacs
automatically.
The current situation, where a large part opf the package is not
documented at all, is IMHO much worse.
I can throw together a few patches as outlined above, if that would
help.
> I was planning on removing the -async option, it is now redundant.
It's much easier to remove part of the docs than to write it ;-)
Anyway, if -noasync stays, you will need some of what I wrote under
its description.
> The behavior you describe is the ultimate goal, we are only
> about 50% there.
The truth is, I still don't know enough about the event loop's
interaction with the target side to write the docs about it. But I
thought there was no better way to get attention to its being
undocumented than to throw some patches on you-all ;-). I do think
that refining the description should be the job of someone who knows
the fine details.
^ 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 --
[not found] <20000307120800.A27315@valinux.com>
2000-04-01 0:00 ` A new revised patch for dlclose H . J . Lu
2000-04-01 0:00 ` Andrew Cagney
2000-04-01 0:00 ` A " Mark Kettenis
[not found] <200003080849.AAA18417@alabama.wrs.com>
[not found] ` <200003081441.JAA02876@devserv.devel.redhat.com>
2000-03-08 14:35 ` Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox