diff options
author | John Gilmore <gnu@cygnus> | 1992-08-29 00:32:58 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-08-29 00:32:58 +0000 |
commit | 9b280a7f5363e4b2ebd8c0a9b2e1782e9769880c (patch) | |
tree | fed6b137c9761b9ad665f87042b99aa93e985017 /gdb/breakpoint.c | |
parent | 92a87f6afd8a3d02873ad5a01cd9b810aee4742a (diff) | |
download | gdb-9b280a7f5363e4b2ebd8c0a9b2e1782e9769880c.zip gdb-9b280a7f5363e4b2ebd8c0a9b2e1782e9769880c.tar.gz gdb-9b280a7f5363e4b2ebd8c0a9b2e1782e9769880c.tar.bz2 |
RS/6000 portability changes (for hosting cross-debuggers).
* breakpoint.c (fixup_breakpoints): Re-kludge to IBM6000_TARGET.
* buildsym.c, rs6000-xdep.c, rs6000-tdep.c, tm-rs6000.h,
xcoffexec.c, xcoffread.c: Rename aixcoff to xcoff everywhere.
* printcmd.c (print_frame_args): Remove an RS/6000 dependency.
* stabsread.c (define_symbol): Remove RS/6000 dependencies.
* tm-rs6000.h (ATTACH_DETACH): Remove: host-dependent.
(PTRACE_ATTACH, PTRACE_DETACH): Remove: host-dep.
(NO_SINGLE_STEP): Add, target-dependent.
(loadinfotextindex): Lowercase, remove "aix_".
* xm-rs6000.h: Add <sys/ptrace.h> for infptrace.c.
(NO_SINGLE_STEP): Remove, target-dependent.
* xcoffexec.c (vmap_symtab): Cleanup #if 0'd code.
* xcoffread.c: Only build file if RS/6000 native GDB.
(build_function_symbol): Remove #if 0'd code.
* rs6000-tdep.c: Cleanup. Add static fn protos.
Use CORE_ADDR for addresses throughout. Make void fns void.
(pop_dummy_frame): Add FIXME about bogosity of design here.
(rs6000_struct_return_address): Ditto.
(frameless_function_invocation, frame_get_cache_fsr,
frame_initial_stack_address, xcoff_relocate_symtab,
xcoff_init_loadinfo, free_loadinfo, xcoff_add_toc_to_loadinfo,
add_text_to_loadinfo, find_toc_address): Move from xdep file.
Use CORE_ADDRs. Change identifiers to lowercase.
* rs6000-xdep.c: Make whole file conditional on native RS/6000,
supplying dummy routines if non-native. Add prototype for
static exec_one_dummy_insn. Move a mess of functions to
rs6000-tdep.c (as above). Remove #if 0'd code.
* config/rs6000.mh (XDEPFILES): Move xcoffexec.o to target side.
(XM_CLIBS): Add -lm to circumvent AIX 3.2 libc ldexp bug.
* config/rs6000.mt (TDEPFILES): Adopt xcoffexec.o.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index fa9ed10..87e8f7c 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -317,11 +317,8 @@ commands_command (arg, from_tty) if (b->number == bnum) { if (from_tty && input_from_terminal_p ()) - { - printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\ + printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\ End with a line saying just \"end\".\n", bnum); - fflush (stdout); - } l = read_command_lines (); free_command_lines (&b->commands); b->commands = l; @@ -1112,9 +1109,11 @@ breakpoints_info (bnum_exp, from_tty) breakpoint_1 (bnum, 0); } +#if MAINTENANCE_CMDS + /* ARGSUSED */ static void -all_breakpoints_info (bnum_exp, from_tty) +maintenance_info_breakpoints (bnum_exp, from_tty) char *bnum_exp; int from_tty; { @@ -1126,6 +1125,8 @@ all_breakpoints_info (bnum_exp, from_tty) breakpoint_1 (bnum, 1); } +#endif + /* Print a message describing any breakpoints set at PC. */ static void @@ -1286,7 +1287,10 @@ enable_longjmp_breakpoint() ALL_BREAKPOINTS (b) if (b->type == bp_longjmp) - b->enable = enabled; + { + b->enable = enabled; + check_duplicates (b->address); + } } void @@ -1295,9 +1299,12 @@ disable_longjmp_breakpoint() register struct breakpoint *b; ALL_BREAKPOINTS (b) - if (b->type == bp_longjmp + if ( b->type == bp_longjmp || b->type == bp_longjmp_resume) - b->enable = disabled; + { + b->enable = disabled; + check_duplicates (b->address); + } } /* Call this after hitting the longjmp() breakpoint. Use this to set a new @@ -1323,6 +1330,7 @@ set_longjmp_resume_breakpoint(pc, frame) b->frame = FRAME_FP(frame); else b->frame = 0; + check_duplicates (b->address); return; } } @@ -2247,6 +2255,11 @@ breakpoint_re_set () static char message1[] = "Error in re-setting breakpoint %d:\n"; char message[sizeof (message1) + 30 /* slop */]; + if (current_source_symtab == NULL) + { + select_source_symtab (NULL); + } + ALL_BREAKPOINTS_SAFE (b, temp) { sprintf (message, message1, b->number); /* Format possible error msg */ @@ -2509,15 +2522,6 @@ decode_line_spec_1 (string, funfirstline) return sals; } - -/* Chain containing all defined enable commands. */ - -extern struct cmd_list_element - *enablelist, *disablelist, - *deletelist, *enablebreaklist; - -extern struct cmd_list_element *cmdlist; - void _initialize_breakpoint () { @@ -2662,7 +2666,9 @@ are set to the address of the last breakpoint listed.\n\n\ Convenience variable \"$bpnum\" contains the number of the last\n\ breakpoint set."); - add_info ("all-breakpoints", all_breakpoints_info, +#if MAINTENANCE_CMDS + + add_cmd ("breakpoints", class_maintenance, maintenance_info_breakpoints, "Status of all breakpoints, or breakpoint number NUMBER.\n\ The \"Type\" column indicates one of:\n\ \tbreakpoint - normal breakpoint\n\ @@ -2678,7 +2684,10 @@ address and file/line number respectively.\n\n\ Convenience variable \"$_\" and default examine address for \"x\"\n\ are set to the address of the last breakpoint listed.\n\n\ Convenience variable \"$bpnum\" contains the number of the last\n\ -breakpoint set."); +breakpoint set.", + &maintenanceinfolist); + +#endif /* MAINTENANCE_CMDS */ add_com ("catch", class_breakpoint, catch_command, "Set breakpoints to catch exceptions that are raised.\n\ @@ -2701,7 +2710,7 @@ an expression changes."); "Synonym for ``info breakpoints''."); } -#ifdef IBM6000_HOST +#ifdef IBM6000_TARGET /* Where should this function go? It is used by AIX only. FIXME. */ /* Breakpoint address relocation used to be done in breakpoint_re_set(). That |