mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-22 10:31:38 +00:00
import gdb-2000-01-17 snapshot
This commit is contained in:
parent
67a95c88f3
commit
c5394b80ae
@ -1,3 +1,82 @@
|
||||
2000-01-17 Jason Molenda (jsm@bugshack.cygnus.com)
|
||||
|
||||
* configure.in (NEW_PROC_API): Fix Unixware-matching regexp.
|
||||
Fix from Robert Lipe <robertl@sco.com>.
|
||||
* configure: Regenerated.
|
||||
|
||||
2000-01-17 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* stack.c (print_frame_info_base): Break up into the frame info
|
||||
(location) printing part and the rest (source line printing).
|
||||
(print_frame): New function. Take care of printing the location
|
||||
information.
|
||||
Update copyright.
|
||||
|
||||
* infrun.c (normal_stop): Use enum values rather than integers for the
|
||||
source_flag to be passed to show_and_print_stack_frame().
|
||||
Update copyright.
|
||||
|
||||
* frame.h (print_what): New enum for 'source' argument to
|
||||
print_frame_info_base(). Use this instead of obscure numbers.
|
||||
Update copyright.
|
||||
|
||||
Sun Jan 16 17:58:00 2000 David Taylor <taylor@texas.cygnus.com>
|
||||
|
||||
* event-top.c (stdin_event_handler): call quit_command rather than
|
||||
exit -- run cleanups, give target code a chance to say goodbye to
|
||||
the target. Fixes bug where the inferior processes were left
|
||||
around on Solaris (and probably elsewhere) by the testsuite.
|
||||
|
||||
2000-01-14 Mark Salter <msalter@cygnus.com>
|
||||
|
||||
* v850-tdep.c (v850_target_architecture_hook): Setup correct
|
||||
machine id for disassembly.
|
||||
|
||||
Thu Jan 13 23:34:17 EST 2000 Nicholas Duffek <nsd@cygnus.com>
|
||||
|
||||
* uw-thread.c: Document libthread.so debugging interface. Minor
|
||||
comment and formatting tweaks.
|
||||
(DEBUG): #define as 0 instead of 1.
|
||||
(CALL_BASE): Include function name in error msg.
|
||||
(libthread_stub): Adjust inferior_pid after thread exit.
|
||||
(uw_thread_create_inferior): Deactivate uw_thread_ops before
|
||||
asking procfs_ops to create inferior.
|
||||
(libthread_init): Don't return nonlocally on error.
|
||||
|
||||
2000-01-12 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* rdi-share/ardi.c (negotiate_params): Fix initialization of static
|
||||
variable.
|
||||
|
||||
2000-01-12 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* remote-rdi.c (arm_rdi_open): Call arm-rdi-close() to make sure
|
||||
both sides are on the same state.
|
||||
|
||||
2000-01-12 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* rdi-share/serdrv.c (find_baud_rate): Fix entries for 57600 and
|
||||
115200 (minor syntax mistake).
|
||||
|
||||
2000-01-12 Jim Blandy <jimb@cygnus.com>
|
||||
|
||||
* config/sparc/tm-sun4sol2.h (MERGEPID): Provide a definition for
|
||||
this here, to go along with the definitions of PIDGET and TIDGET.
|
||||
|
||||
2000-01-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* thread.c (do_captured_thread_select): New function. Switch
|
||||
current thread, safely from within catch_errors().
|
||||
(gdb_thread_select): New function. Switch threads safely.
|
||||
(thread_command): Use gdb_thread_select().
|
||||
|
||||
2000-01-11 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* configure.in: Avoid linking -limagehlp unless it's a native build.
|
||||
* configure: Regenerate.
|
||||
* thread.cc (add_thread): Clear private data pointer here or suffer
|
||||
strange behavior when it is checked for NULL later.
|
||||
|
||||
2000-01-09 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* win32nat.c (handle_exceptions): Handle various arithmetic exceptions.
|
||||
|
@ -229,7 +229,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
|
||||
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
||||
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
||||
|
||||
VERSION = 20000110
|
||||
VERSION = 20000117
|
||||
DIST=gdb
|
||||
|
||||
LINT=/usr/5bin/lint
|
||||
|
@ -78,4 +78,4 @@ extern char *sunpro_static_transform_name PARAMS ((char *));
|
||||
/* Macros to extract process id and thread id from a composite pid/tid */
|
||||
#define PIDGET(pid) ((pid) & 0xffff)
|
||||
#define TIDGET(pid) (((pid) >> 16) & 0xffff)
|
||||
|
||||
#define MERGEPID(pid, tid) (((tid) << 16) | (pid))
|
||||
|
34
gdb/configure
vendored
34
gdb/configure
vendored
@ -4181,7 +4181,7 @@ EOF
|
||||
EOF
|
||||
|
||||
;;
|
||||
*-*-unixware* | *-*-sysv4.2uw2.* | *-*-sysv4.2uw7.*)
|
||||
*-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define NEW_PROC_API 1
|
||||
EOF
|
||||
@ -5546,7 +5546,11 @@ fi
|
||||
# libreadline needs libuser32.a in a cygwin environment
|
||||
WIN32LIBS=
|
||||
if test x$gdb_cv_os_cygwin = xyes; then
|
||||
WIN32LIBS="-luser32 -limagehlp"
|
||||
WIN32LIBS="-luser32"
|
||||
case "${target}" in
|
||||
*cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
@ -5556,7 +5560,7 @@ fi
|
||||
# Uses ac_ vars as temps to allow command line to override cache and checks.
|
||||
# --without-x overrides everything else, but does not touch the cache.
|
||||
echo $ac_n "checking for X""... $ac_c" 1>&6
|
||||
echo "configure:6767: checking for X" >&5
|
||||
echo "configure:6771: checking for X" >&5
|
||||
|
||||
# Check whether --with-x or --without-x was given.
|
||||
if test "${with_x+set}" = set; then
|
||||
@ -5618,12 +5622,12 @@ if test "$ac_x_includes" = NO; then
|
||||
|
||||
# First, try using that file with no special directory specified.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6829 "configure"
|
||||
#line 6833 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$x_direct_test_include>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:6834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:6838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
@ -5692,14 +5696,14 @@ if test "$ac_x_libraries" = NO; then
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-l$x_direct_test_library $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6903 "configure"
|
||||
#line 6907 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
${x_direct_test_function}()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:6914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
LIBS="$ac_save_LIBS"
|
||||
# We can link X programs with no special library path.
|
||||
@ -5979,12 +5983,12 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
|
||||
echo "configure:7261: checking for Cygwin environment" >&5
|
||||
echo "configure:7265: checking for Cygwin environment" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 7266 "configure"
|
||||
#line 7270 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
@ -5995,7 +5999,7 @@ int main() {
|
||||
return __CYGWIN__;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:7277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:7281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_cygwin=yes
|
||||
else
|
||||
@ -6012,19 +6016,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
|
||||
CYGWIN=
|
||||
test "$ac_cv_cygwin" = yes && CYGWIN=yes
|
||||
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
|
||||
echo "configure:7294: checking for mingw32 environment" >&5
|
||||
echo "configure:7298: checking for mingw32 environment" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 7299 "configure"
|
||||
#line 7303 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
return __MINGW32__;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:7306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:7310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_mingw32=yes
|
||||
else
|
||||
@ -6043,7 +6047,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
|
||||
|
||||
|
||||
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
|
||||
echo "configure:7325: checking for executable suffix" >&5
|
||||
echo "configure:7329: checking for executable suffix" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -6053,7 +6057,7 @@ else
|
||||
rm -f conftest*
|
||||
echo 'int main () { return 0; }' > conftest.$ac_ext
|
||||
ac_cv_exeext=
|
||||
if { (eval echo configure:7335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
if { (eval echo configure:7339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
for file in conftest.*; do
|
||||
case $file in
|
||||
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
|
||||
|
@ -152,7 +152,7 @@ if test "${target}" = "${host}"; then
|
||||
AC_DEFINE(START_INFERIOR_TRAPS_EXPECTED,2)
|
||||
AC_DEFINE(sys_quotactl)
|
||||
;;
|
||||
*-*-unixware* | *-*-sysv4.2uw2.* | *-*-sysv4.2uw7.*)
|
||||
*-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
|
||||
AC_DEFINE(NEW_PROC_API)
|
||||
;;
|
||||
# FIXME: we would like to define NEW_PROC_API for all versions of
|
||||
@ -488,7 +488,11 @@ AC_SUBST(TERM_LIB)
|
||||
# libreadline needs libuser32.a in a cygwin environment
|
||||
WIN32LIBS=
|
||||
if test x$gdb_cv_os_cygwin = xyes; then
|
||||
WIN32LIBS="-luser32 -limagehlp"
|
||||
WIN32LIBS="-luser32"
|
||||
case "${target}" in
|
||||
*cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_SUBST(WIN32LIBS)
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
2000-01-16 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* gdb.texinfo (Breakpoints): Mention breakpoint ranges.
|
||||
(Delete Breaks): Mention range arguments.
|
||||
(Disabling): Likewise.
|
||||
|
||||
2000-01-05 Dmitry Sivachenko <dima@Chg.RU>
|
||||
|
||||
* gdb.texinfo: Wrap "ASCII" in @sc{}; clarify a few sentences.
|
||||
|
@ -2100,6 +2100,14 @@ breakpoint you want to change. Each breakpoint may be @dfn{enabled} or
|
||||
@dfn{disabled}; if disabled, it has no effect on your program until you
|
||||
enable it again.
|
||||
|
||||
@cindex breakpoint ranges
|
||||
@cindex ranges of breakpoints
|
||||
Some @value{GDBN} commands accept a range of breakpoints on which to
|
||||
operate. A breakpoint range is either a single breakpoint number, like
|
||||
@samp{5}, or two such numbers, in increasing order, separated by a
|
||||
hyphen, like @samp{5-7}. When a breakpoint range is given to a command,
|
||||
all breakpoint in that range are operated on.
|
||||
|
||||
@menu
|
||||
* Set Breaks:: Setting breakpoints
|
||||
* Set Watchpoints:: Setting watchpoints
|
||||
@ -2633,9 +2641,9 @@ Delete any breakpoints set at or within the code of the specified line.
|
||||
@cindex delete breakpoints
|
||||
@kindex delete
|
||||
@kindex d
|
||||
@item delete @r{[}breakpoints@r{]} @r{[}@var{bnums}@dots{}@r{]}
|
||||
Delete the breakpoints, watchpoints, or catchpoints of the numbers
|
||||
specified as arguments. If no argument is specified, delete all
|
||||
@item delete @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]}
|
||||
Delete the breakpoints, watchpoints, or catchpoints of the breakpoint
|
||||
ranges specified as arguments. If no argument is specified, delete all
|
||||
breakpoints (@value{GDBN} asks confirmation, unless you have @code{set
|
||||
confirm off}). You can abbreviate this command as @code{d}.
|
||||
@end table
|
||||
@ -2681,7 +2689,7 @@ watchpoints, and catchpoints:
|
||||
@kindex disable breakpoints
|
||||
@kindex disable
|
||||
@kindex dis
|
||||
@item disable @r{[}breakpoints@r{]} @r{[}@var{bnums}@dots{}@r{]}
|
||||
@item disable @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]}
|
||||
Disable the specified breakpoints---or all breakpoints, if none are
|
||||
listed. A disabled breakpoint has no effect but is not forgotten. All
|
||||
options such as ignore-counts, conditions and commands are remembered in
|
||||
@ -2690,15 +2698,15 @@ case the breakpoint is enabled again later. You may abbreviate
|
||||
|
||||
@kindex enable breakpoints
|
||||
@kindex enable
|
||||
@item enable @r{[}breakpoints@r{]} @r{[}@var{bnums}@dots{}@r{]}
|
||||
@item enable @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]}
|
||||
Enable the specified breakpoints (or all defined breakpoints). They
|
||||
become effective once again in stopping your program.
|
||||
|
||||
@item enable @r{[}breakpoints@r{]} once @var{bnums}@dots{}
|
||||
@item enable @r{[}breakpoints@r{]} once @var{range}@dots{}
|
||||
Enable the specified breakpoints temporarily. @value{GDBN} disables any
|
||||
of these breakpoints immediately after stopping your program.
|
||||
|
||||
@item enable @r{[}breakpoints@r{]} delete @var{bnums}@dots{}
|
||||
@item enable @r{[}breakpoints@r{]} delete @var{range}@dots{}
|
||||
Enable the specified breakpoints to work once, then die. @value{GDBN}
|
||||
deletes any of these breakpoints as soon as your program stops there.
|
||||
@end table
|
||||
|
@ -410,7 +410,7 @@ stdin_event_handler (int error, gdb_client_data client_data)
|
||||
delete_file_handler (input_fd);
|
||||
discard_all_continuations ();
|
||||
/* If stdin died, we may as well kill gdb. */
|
||||
exit (1);
|
||||
quit_command ((char *) 0, stdin == instream);
|
||||
}
|
||||
else
|
||||
(*call_readline) (client_data);
|
||||
|
16
gdb/frame.h
16
gdb/frame.h
@ -1,5 +1,5 @@
|
||||
/* Definitions for dealing with stack frames, for GDB, the GNU debugger.
|
||||
Copyright 1986, 1989, 1991, 1992, 1999 Free Software Foundation, Inc.
|
||||
Copyright 1986, 1989, 1991, 1992, 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@ -99,6 +99,20 @@ struct frame_info
|
||||
struct frame_info *next, *prev;
|
||||
};
|
||||
|
||||
/* Values for the source flag to be used in print_frame_info_base(). */
|
||||
enum print_what
|
||||
{
|
||||
/* Print only the source line, like in stepi. */
|
||||
SRC_LINE = -1,
|
||||
/* Print only the location, i.e. level, address (sometimes)
|
||||
function, args, file, line, line num. */
|
||||
LOCATION,
|
||||
/* Print both of the above. */
|
||||
SRC_AND_LOC,
|
||||
/* Print location only, but always include the address. */
|
||||
LOC_AND_ADDRESS
|
||||
};
|
||||
|
||||
/* Allocate additional space for appendices to a struct frame_info. */
|
||||
|
||||
#ifndef SIZEOF_FRAME_SAVED_REGS
|
||||
|
@ -146,7 +146,7 @@ fill_gregset (gregset_t *gregsetp,
|
||||
signed char valid[NUM_GREGS];
|
||||
memset (valid, 0, sizeof (valid));
|
||||
valid[regno] = 1;
|
||||
convert_to_gregset (gregsetp, valid, valid);
|
||||
convert_to_gregset (gregsetp, registers, valid);
|
||||
}
|
||||
}
|
||||
|
||||
|
16
gdb/infrun.c
16
gdb/infrun.c
@ -1,5 +1,5 @@
|
||||
/* Target-struct-independent code to start (run) and stop an inferior process.
|
||||
Copyright 1986-1989, 1991-1999 Free Software Foundation, Inc.
|
||||
Copyright 1986-1989, 1991-2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@ -3381,15 +3381,15 @@ The same program may be running in another process.\n");
|
||||
if (stop_step
|
||||
&& step_frame_address == FRAME_FP (get_current_frame ())
|
||||
&& step_start_function == find_pc_function (stop_pc))
|
||||
source_flag = -1; /* finished step, just print source line */
|
||||
source_flag = SRC_LINE; /* finished step, just print source line */
|
||||
else
|
||||
source_flag = 1; /* print location and source line */
|
||||
source_flag = SRC_AND_LOC; /* print location and source line */
|
||||
break;
|
||||
case PRINT_SRC_AND_LOC:
|
||||
source_flag = 1; /* print location and source line */
|
||||
source_flag = SRC_AND_LOC; /* print location and source line */
|
||||
break;
|
||||
case PRINT_SRC_ONLY:
|
||||
source_flag = -1;
|
||||
source_flag = SRC_LINE;
|
||||
break;
|
||||
case PRINT_NOTHING:
|
||||
do_frame_printing = 0;
|
||||
@ -3400,9 +3400,9 @@ The same program may be running in another process.\n");
|
||||
|
||||
/* The behavior of this routine with respect to the source
|
||||
flag is:
|
||||
-1: Print only source line
|
||||
0: Print only location
|
||||
1: Print location and source line */
|
||||
SRC_LINE: Print only source line
|
||||
LOCATION: Print only location
|
||||
SRC_AND_LOC: Print location and source line */
|
||||
if (do_frame_printing)
|
||||
show_and_print_stack_frame (selected_frame, -1, source_flag);
|
||||
|
||||
|
@ -320,9 +320,12 @@ static AdpErrs negotiate_params( const ParameterOptions *user_options )
|
||||
|
||||
time_t t;
|
||||
|
||||
static volatile NegotiateState n_state = {
|
||||
FALSE, FALSE, FALSE, &accepted_config };
|
||||
|
||||
static volatile NegotiateState n_state;
|
||||
n_state.negotiate_resp = FALSE;
|
||||
n_state.negotiate_ack = FALSE;
|
||||
n_state.link_check_resp = FALSE;
|
||||
n_state.accepted_config = &accepted_config;
|
||||
|
||||
#ifdef DEBUG
|
||||
angel_DebugPrint( "negotiate_params\n" );
|
||||
#endif
|
||||
|
@ -85,10 +85,10 @@ static struct writestate wstate;
|
||||
* The set of parameter options supported by the device
|
||||
*/
|
||||
static unsigned int baud_options[] = {
|
||||
#ifdef B115200 || __hpux
|
||||
#if defined(B115200) || defined(__hpux)
|
||||
115200,
|
||||
#endif
|
||||
#ifdef B57600 || __hpux
|
||||
#if defined(B57600) || defined(__hpux)
|
||||
57600,
|
||||
#endif
|
||||
38400, 19200, 9600
|
||||
|
@ -251,7 +251,7 @@ device is attached to the remote system (e.g. /dev/ttya).");
|
||||
|
||||
/* Make the basic low-level connection. */
|
||||
|
||||
Adp_CloseDevice ();
|
||||
arm_rdi_close (0);
|
||||
rslt = Adp_OpenDevice (devName, openArgs, rdi_heartbeat);
|
||||
|
||||
if (rslt != adp_ok)
|
||||
|
255
gdb/stack.c
255
gdb/stack.c
@ -1,5 +1,5 @@
|
||||
/* Print and select stack frames for GDB, the GNU debugger.
|
||||
Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 98, 1999
|
||||
Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 98, 1999, 2000
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
@ -92,6 +92,12 @@ static int print_block_frame_locals PARAMS ((struct block *,
|
||||
int,
|
||||
GDB_FILE *));
|
||||
|
||||
static void print_frame (struct frame_info *fi,
|
||||
int level,
|
||||
int source,
|
||||
int args,
|
||||
struct symtab_and_line sal);
|
||||
|
||||
static void print_frame_info_base PARAMS ((struct frame_info *, int, int, int));
|
||||
|
||||
static void print_stack_frame_base PARAMS ((struct frame_info *, int, int));
|
||||
@ -328,14 +334,14 @@ print_args_stub (args)
|
||||
}
|
||||
|
||||
/* Print information about a frame for frame "fi" at level "level".
|
||||
* Used in "where" output, also used to emit breakpoint or step messages.
|
||||
* LEVEL is the level of the frame, or -1 if it is the innermost frame
|
||||
* but we don't want to print the level.
|
||||
* The meaning of the SOURCE argument is:
|
||||
* -1: Print only source line
|
||||
* 0: Print only location
|
||||
* 1: Print location and source line
|
||||
*/
|
||||
Used in "where" output, also used to emit breakpoint or step
|
||||
messages.
|
||||
LEVEL is the level of the frame, or -1 if it is the
|
||||
innermost frame but we don't want to print the level.
|
||||
The meaning of the SOURCE argument is:
|
||||
SRC_LINE: Print only source line
|
||||
LOCATION: Print only location
|
||||
LOC_AND_SRC: Print location and source line. */
|
||||
|
||||
static void
|
||||
print_frame_info_base (fi, level, source, args)
|
||||
@ -345,9 +351,8 @@ print_frame_info_base (fi, level, source, args)
|
||||
int args;
|
||||
{
|
||||
struct symtab_and_line sal;
|
||||
struct symbol *func;
|
||||
register char *funname = 0;
|
||||
enum language funlang = language_unknown;
|
||||
int source_print;
|
||||
int location_print;
|
||||
|
||||
#if 0
|
||||
char buf[MAX_REGISTER_RAW_SIZE];
|
||||
@ -406,6 +411,57 @@ print_frame_info_base (fi, level, source, args)
|
||||
&& !fi->next->signal_handler_caller
|
||||
&& !frame_in_dummy (fi->next));
|
||||
|
||||
location_print = (source == LOCATION
|
||||
|| source == LOC_AND_ADDRESS
|
||||
|| source == SRC_AND_LOC);
|
||||
|
||||
if (location_print || !sal.symtab)
|
||||
print_frame (fi, level, source, args, sal);
|
||||
|
||||
source_print = (source == SRC_LINE || source == SRC_AND_LOC);
|
||||
|
||||
if (source_print && sal.symtab)
|
||||
{
|
||||
int done = 0;
|
||||
int mid_statement = (source == SRC_LINE) && (fi->pc != sal.pc);
|
||||
|
||||
if (annotation_level)
|
||||
done = identify_source_line (sal.symtab, sal.line, mid_statement,
|
||||
fi->pc);
|
||||
if (!done)
|
||||
{
|
||||
if (addressprint && mid_statement && !tui_version)
|
||||
{
|
||||
print_address_numeric (fi->pc, 1, gdb_stdout);
|
||||
printf_filtered ("\t");
|
||||
}
|
||||
if (print_frame_info_listing_hook)
|
||||
print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
|
||||
else if (!tui_version)
|
||||
print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
|
||||
}
|
||||
current_source_line = max (sal.line - lines_to_list / 2, 1);
|
||||
}
|
||||
|
||||
if (source != 0)
|
||||
set_default_breakpoint (1, fi->pc, sal.symtab, sal.line);
|
||||
|
||||
annotate_frame_end ();
|
||||
|
||||
gdb_flush (gdb_stdout);
|
||||
}
|
||||
|
||||
static void
|
||||
print_frame (struct frame_info *fi,
|
||||
int level,
|
||||
int source,
|
||||
int args,
|
||||
struct symtab_and_line sal)
|
||||
{
|
||||
struct symbol *func;
|
||||
register char *funname = 0;
|
||||
enum language funlang = language_unknown;
|
||||
|
||||
func = find_pc_function (fi->pc);
|
||||
if (func)
|
||||
{
|
||||
@ -446,19 +502,17 @@ print_frame_info_base (fi, level, source, args)
|
||||
}
|
||||
else
|
||||
{
|
||||
/* I'd like to use SYMBOL_SOURCE_NAME() here, to display
|
||||
* the demangled name that we already have stored in
|
||||
* the symbol table, but we stored a version with
|
||||
* DMGL_PARAMS turned on, and here we don't want
|
||||
* to display parameters. So call the demangler again,
|
||||
* with DMGL_ANSI only. RT
|
||||
* (Yes, I know that printf_symbol_filtered() will
|
||||
* again try to demangle the name on the fly, but
|
||||
* the issue is that if cplus_demangle() fails here,
|
||||
* it'll fail there too. So we want to catch the failure
|
||||
* ("demangled==NULL" case below) here, while we still
|
||||
* have our hands on the function symbol.)
|
||||
*/
|
||||
/* I'd like to use SYMBOL_SOURCE_NAME() here, to display the
|
||||
demangled name that we already have stored in the symbol
|
||||
table, but we stored a version with DMGL_PARAMS turned
|
||||
on, and here we don't want to display parameters. So call
|
||||
the demangler again, with DMGL_ANSI only. (Yes, I know
|
||||
that printf_symbol_filtered() will again try to demangle
|
||||
the name on the fly, but the issue is that if
|
||||
cplus_demangle() fails here, it'll fail there too. So we
|
||||
want to catch the failure ("demangled==NULL" case below)
|
||||
here, while we still have our hands on the function
|
||||
symbol.) */
|
||||
char *demangled;
|
||||
funname = SYMBOL_NAME (func);
|
||||
funlang = SYMBOL_LANGUAGE (func);
|
||||
@ -466,10 +520,9 @@ print_frame_info_base (fi, level, source, args)
|
||||
{
|
||||
demangled = cplus_demangle (funname, DMGL_ANSI);
|
||||
if (demangled == NULL)
|
||||
/* If the demangler fails, try the demangled name
|
||||
* from the symbol table. This'll have parameters,
|
||||
* but that's preferable to diplaying a mangled name.
|
||||
*/
|
||||
/* If the demangler fails, try the demangled name from
|
||||
the symbol table. This'll have parameters, but
|
||||
that's preferable to diplaying a mangled name. */
|
||||
funname = SYMBOL_SOURCE_NAME (func);
|
||||
}
|
||||
}
|
||||
@ -484,104 +537,76 @@ print_frame_info_base (fi, level, source, args)
|
||||
}
|
||||
}
|
||||
|
||||
if (source >= 0 || !sal.symtab)
|
||||
{
|
||||
annotate_frame_begin (level == -1 ? 0 : level, fi->pc);
|
||||
annotate_frame_begin (level == -1 ? 0 : level, fi->pc);
|
||||
|
||||
if (level >= 0)
|
||||
printf_filtered ("#%-2d ", level);
|
||||
if (addressprint)
|
||||
if (fi->pc != sal.pc || !sal.symtab)
|
||||
{
|
||||
annotate_frame_address ();
|
||||
print_address_numeric (fi->pc, 1, gdb_stdout);
|
||||
annotate_frame_address_end ();
|
||||
printf_filtered (" in ");
|
||||
}
|
||||
annotate_frame_function_name ();
|
||||
fprintf_symbol_filtered (gdb_stdout, funname ? funname : "??", funlang,
|
||||
DMGL_ANSI);
|
||||
|
||||
if (level >= 0)
|
||||
printf_filtered ("#%-2d ", level);
|
||||
if (addressprint)
|
||||
if (fi->pc != sal.pc || !sal.symtab || source == LOC_AND_ADDRESS)
|
||||
{
|
||||
annotate_frame_address ();
|
||||
print_address_numeric (fi->pc, 1, gdb_stdout);
|
||||
annotate_frame_address_end ();
|
||||
printf_filtered (" in ");
|
||||
}
|
||||
annotate_frame_function_name ();
|
||||
fprintf_symbol_filtered (gdb_stdout, funname ? funname : "??", funlang,
|
||||
DMGL_ANSI);
|
||||
wrap_here (" ");
|
||||
annotate_frame_args ();
|
||||
|
||||
fputs_filtered (" (", gdb_stdout);
|
||||
if (args)
|
||||
{
|
||||
struct print_args_args args;
|
||||
args.fi = fi;
|
||||
args.func = func;
|
||||
args.stream = gdb_stdout;
|
||||
catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
|
||||
QUIT;
|
||||
}
|
||||
printf_filtered (")");
|
||||
if (sal.symtab && sal.symtab->filename)
|
||||
{
|
||||
annotate_frame_source_begin ();
|
||||
wrap_here (" ");
|
||||
annotate_frame_args ();
|
||||
fputs_filtered (" (", gdb_stdout);
|
||||
if (args)
|
||||
{
|
||||
struct print_args_args args;
|
||||
args.fi = fi;
|
||||
args.func = func;
|
||||
args.stream = gdb_stdout;
|
||||
catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
|
||||
QUIT;
|
||||
}
|
||||
printf_filtered (")");
|
||||
if (sal.symtab && sal.symtab->filename)
|
||||
{
|
||||
annotate_frame_source_begin ();
|
||||
wrap_here (" ");
|
||||
printf_filtered (" at ");
|
||||
annotate_frame_source_file ();
|
||||
printf_filtered ("%s", sal.symtab->filename);
|
||||
annotate_frame_source_file_end ();
|
||||
printf_filtered (":");
|
||||
annotate_frame_source_line ();
|
||||
printf_filtered ("%d", sal.line);
|
||||
annotate_frame_source_end ();
|
||||
}
|
||||
printf_filtered (" at ");
|
||||
annotate_frame_source_file ();
|
||||
printf_filtered ("%s", sal.symtab->filename);
|
||||
annotate_frame_source_file_end ();
|
||||
printf_filtered (":");
|
||||
annotate_frame_source_line ();
|
||||
printf_filtered ("%d", sal.line);
|
||||
annotate_frame_source_end ();
|
||||
}
|
||||
|
||||
#ifdef PC_LOAD_SEGMENT
|
||||
/* If we couldn't print out function name but if can figure out what
|
||||
/* If we couldn't print out function name but if can figure out what
|
||||
load segment this pc value is from, at least print out some info
|
||||
about its load segment. */
|
||||
if (!funname)
|
||||
if (!funname)
|
||||
{
|
||||
annotate_frame_where ();
|
||||
wrap_here (" ");
|
||||
printf_filtered (" from %s", PC_LOAD_SEGMENT (fi->pc));
|
||||
}
|
||||
#endif /* PC_LOAD_SEGMENT */
|
||||
|
||||
#ifdef PC_SOLIB
|
||||
if (!funname || (!sal.symtab || !sal.symtab->filename))
|
||||
{
|
||||
char *lib = PC_SOLIB (fi->pc);
|
||||
if (lib)
|
||||
{
|
||||
annotate_frame_where ();
|
||||
wrap_here (" ");
|
||||
printf_filtered (" from %s", PC_LOAD_SEGMENT (fi->pc));
|
||||
printf_filtered (" from %s", lib);
|
||||
}
|
||||
#endif
|
||||
#ifdef PC_SOLIB
|
||||
if (!funname || (!sal.symtab || !sal.symtab->filename))
|
||||
{
|
||||
char *lib = PC_SOLIB (fi->pc);
|
||||
if (lib)
|
||||
{
|
||||
annotate_frame_where ();
|
||||
wrap_here (" ");
|
||||
printf_filtered (" from %s", lib);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
printf_filtered ("\n");
|
||||
}
|
||||
#endif /* PC_SOLIB */
|
||||
|
||||
if ((source != 0) && sal.symtab)
|
||||
{
|
||||
int done = 0;
|
||||
int mid_statement = source < 0 && fi->pc != sal.pc;
|
||||
if (annotation_level)
|
||||
done = identify_source_line (sal.symtab, sal.line, mid_statement,
|
||||
fi->pc);
|
||||
if (!done)
|
||||
{
|
||||
if (addressprint && mid_statement && !tui_version)
|
||||
{
|
||||
print_address_numeric (fi->pc, 1, gdb_stdout);
|
||||
printf_filtered ("\t");
|
||||
}
|
||||
if (print_frame_info_listing_hook)
|
||||
print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
|
||||
else if (!tui_version)
|
||||
print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
|
||||
}
|
||||
current_source_line = max (sal.line - lines_to_list / 2, 1);
|
||||
}
|
||||
|
||||
if (source != 0)
|
||||
set_default_breakpoint (1, fi->pc, sal.symtab, sal.line);
|
||||
|
||||
annotate_frame_end ();
|
||||
|
||||
gdb_flush (gdb_stdout);
|
||||
printf_filtered ("\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2000-01-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* gdb.base/default.exp: Fix expected pattern.
|
||||
* gdb.base/help.exp: Same.
|
||||
|
||||
2000-01-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* gdb.base/so-indr-cl.exp: Don't execute the test if not on HPUX.
|
||||
|
@ -727,7 +727,7 @@ gdb_expect {
|
||||
if ![istarget "*-*-udi*"] then {
|
||||
send_gdb "target remote\n"
|
||||
gdb_expect {
|
||||
-re "To open a remote debug connection, you need to specify what.*serial.*device is attached to the remote system .e.g. .*$gdb_prompt $"\
|
||||
-re "To open a remote debug connection, you need to specify what.*serial.*device is attached to the remote system.*.e.g. .*$gdb_prompt $"\
|
||||
{ pass "target remote" }
|
||||
-re ".*A program is being debugged already. Kill it. .y or n.*$" {
|
||||
send_gdb "n\n"
|
||||
|
@ -504,7 +504,7 @@ gdb_test "help target core" ".*Use a core file as a target.*Specify the filename
|
||||
# test help target exec
|
||||
gdb_test "help target exec" "Use an executable file as a target..*\[\r\n\]+Specify the filename of the executable file." "help target exec"
|
||||
# test help target remote
|
||||
gdb_test "help target remote" "Use a remote computer via a serial line, using a gdb-specific protocol..*\[\r\n\]+Specify the serial device it is connected to .e.g. .*" "help target remote"
|
||||
gdb_test "help target remote" "Use a remote computer via a serial line, using a gdb-specific protocol..*\[\r\n\]+Specify the serial device it is connected to.*\[\r\n\]+.e.g. .*" "help target remote"
|
||||
# test help target
|
||||
# the child process target may be "target child" or "target procfs"
|
||||
gdb_test "help target" "Connect to a target machine or process..*\[\r\n\]+The first argument is the type or protocol of the target machine..*\[\r\n\]+Remaining arguments are interpreted by the target protocol. For more.*\[\r\n\]+information on the arguments for a particular protocol, type.*\[\r\n\]+`help target ' followed by the protocol name..*\[\r\n\]+List of target subcommands:.*\[\r\n\]+target exec -- Use an executable file as a target.*\[\r\n\]+Type \"help target\" followed by target subcommand name for full documentation..*\[\r\n\]+Command name abbreviations are allowed if unambiguous." "help target"
|
||||
|
28
gdb/thread.c
28
gdb/thread.c
@ -106,6 +106,7 @@ add_thread (pid)
|
||||
tp->stepping_through_solib_catchpoints = NULL;
|
||||
tp->stepping_through_sigtramp = 0;
|
||||
tp->next = thread_list;
|
||||
tp->private = NULL;
|
||||
thread_list = tp;
|
||||
return tp;
|
||||
}
|
||||
@ -602,9 +603,6 @@ thread_command (tidstr, from_tty)
|
||||
char *tidstr;
|
||||
int from_tty;
|
||||
{
|
||||
int num;
|
||||
struct thread_info *tp;
|
||||
|
||||
if (!tidstr)
|
||||
{
|
||||
/* Don't generate an error, just say which thread is current. */
|
||||
@ -621,7 +619,17 @@ thread_command (tidstr, from_tty)
|
||||
error ("No stack.");
|
||||
return;
|
||||
}
|
||||
num = atoi (tidstr);
|
||||
|
||||
gdb_thread_select (tidstr);
|
||||
}
|
||||
|
||||
static int
|
||||
do_captured_thread_select (void *tidstr)
|
||||
{
|
||||
int num;
|
||||
struct thread_info *tp;
|
||||
|
||||
num = atoi ((char *)tidstr);
|
||||
|
||||
tp = find_thread_id (num);
|
||||
|
||||
@ -634,9 +642,6 @@ see the IDs of currently known threads.", num);
|
||||
|
||||
switch_to_thread (tp->pid);
|
||||
|
||||
if (context_hook)
|
||||
context_hook (num);
|
||||
|
||||
printf_filtered ("[Switching to thread %d (%s)]\n",
|
||||
pid_to_thread_id (inferior_pid),
|
||||
#if defined(HPUXHPPA)
|
||||
@ -645,7 +650,16 @@ see the IDs of currently known threads.", num);
|
||||
target_pid_to_str (inferior_pid)
|
||||
#endif
|
||||
);
|
||||
|
||||
print_stack_frame (selected_frame, selected_frame_level, 1);
|
||||
return GDB_RC_OK;
|
||||
}
|
||||
|
||||
enum gdb_rc
|
||||
gdb_thread_select (char *tidstr)
|
||||
{
|
||||
return catch_errors (do_captured_thread_select, tidstr,
|
||||
NULL, RETURN_MASK_ALL);
|
||||
}
|
||||
|
||||
/* Commands with a prefix of `thread'. */
|
||||
|
1095
gdb/uw-thread.c
Normal file
1095
gdb/uw-thread.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -869,6 +869,7 @@ v850_target_architecture_hook (ap)
|
||||
if (v850_processor_type_table[i].mach == ap->mach)
|
||||
{
|
||||
v850_register_names = v850_processor_type_table[i].regnames;
|
||||
tm_print_insn_info.mach = ap->mach;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2000-01-13 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* interp.c (sim_resume): Do not rely upon host semantics of shift
|
||||
operators to implement M*Core semantics.
|
||||
|
||||
Thu Sep 2 18:15:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* configure: Regenerated to track ../common/aclocal.m4 changes.
|
||||
|
@ -1181,7 +1181,9 @@ sim_resume (sd, step, siggnal)
|
||||
unsigned long dst, src;
|
||||
dst = cpu.gr[RD];
|
||||
src = cpu.gr[RS];
|
||||
dst = dst >> src;
|
||||
/* We must not rely solely upon the native shift operations, since they
|
||||
may not match the M*Core's behaviour on boundary conditions. */
|
||||
dst = src > 31 ? 0 : dst >> src;
|
||||
cpu.gr[RD] = dst;
|
||||
}
|
||||
break;
|
||||
@ -1256,11 +1258,18 @@ sim_resume (sd, step, siggnal)
|
||||
break;
|
||||
|
||||
case 0x1A: /* asr */
|
||||
cpu.gr[RD] = (long)cpu.gr[RD] >> cpu.gr[RS];
|
||||
/* We must not rely solely upon the native shift operations, since they
|
||||
may not match the M*Core's behaviour on boundary conditions. */
|
||||
if (cpu.gr[RS] > 30)
|
||||
cpu.gr[RD] = ((long) cpu.gr[RD]) < 0 ? -1 : 0;
|
||||
else
|
||||
cpu.gr[RD] = (long) cpu.gr[RD] >> cpu.gr[RS];
|
||||
break;
|
||||
|
||||
case 0x1B: /* lsl */
|
||||
cpu.gr[RD] = cpu.gr[RD] << cpu.gr[RS];
|
||||
/* We must not rely solely upon the native shift operations, since they
|
||||
may not match the M*Core's behaviour on boundary conditions. */
|
||||
cpu.gr[RD] = cpu.gr[RS] > 31 ? 0 : cpu.gr[RD] << cpu.gr[RS];
|
||||
break;
|
||||
|
||||
case 0x1C: /* addu */
|
||||
|
Loading…
x
Reference in New Issue
Block a user