1999-04-16 03:35:26 +02:00
|
|
|
|
/* Everything about breakpoints, for GDB.
|
2002-01-17 23:15:18 +01:00
|
|
|
|
|
2007-01-09 18:59:20 +01:00
|
|
|
|
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
|
2008-01-01 23:53:26 +01:00
|
|
|
|
1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
|
|
|
|
2008 Free Software Foundation, Inc.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
This file is part of GDB.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-08-23 20:08:50 +02:00
|
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
1999-07-07 22:19:36 +02:00
|
|
|
|
(at your option) any later version.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
You should have received a copy of the GNU General Public License
|
2007-08-23 20:08:50 +02:00
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
|
#include <ctype.h>
|
2008-02-08 01:42:07 +01:00
|
|
|
|
#include "hashtab.h"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
#include "symtab.h"
|
|
|
|
|
#include "frame.h"
|
|
|
|
|
#include "breakpoint.h"
|
|
|
|
|
#include "gdbtypes.h"
|
|
|
|
|
#include "expression.h"
|
|
|
|
|
#include "gdbcore.h"
|
|
|
|
|
#include "gdbcmd.h"
|
|
|
|
|
#include "value.h"
|
|
|
|
|
#include "command.h"
|
|
|
|
|
#include "inferior.h"
|
|
|
|
|
#include "gdbthread.h"
|
|
|
|
|
#include "target.h"
|
|
|
|
|
#include "language.h"
|
|
|
|
|
#include "gdb_string.h"
|
|
|
|
|
#include "demangle.h"
|
|
|
|
|
#include "annotate.h"
|
|
|
|
|
#include "symfile.h"
|
|
|
|
|
#include "objfiles.h"
|
2002-09-20 16:58:59 +02:00
|
|
|
|
#include "source.h"
|
2000-11-30 Fernando Nasser <fnasser@redhat.com>
* linespec.h: New file. Declarations for linespec.c.
* linespec.c, alpha-tdep.c, breakpoint.c, parse.c, source.c,
symtab.c, tracepoint.c: Include the above.
* completer.c: New file. Line completion stuff for GDB.
(get_gdb_completer_word_break_characters,
get_gdb_completer_quote_characters): New functions. Accessors for
useful completer internal data.
(filename_completer, line_completion_function, skip_quoted): Moved
here from top.c.
* completer.h: New file. Declarations for the above.
* linespec.c (decode_line_1): Use
get_gdb_completer_word_break_characters and
get_gdb_completer_quote_characters.
* top.c: Include completer.h.
(filename_completer, line_completion_function, skip_quoted):
Moved to completer.c.
* corefile.c, exec.c, source.c, symfile.c, linespec.c: Include
completer.h.
* Makefile.in (SFILES): Add completer.c.
(COMMON_OBS): Add completer.o.
(completer.o): New target.
(linespec.o, alpha-tdep.o, breakpoint.o, parse.o, source.o,
symtab.o, tracepoint.o): Add linespec.h to dependencies list.
(corefile.o, exec.o, source.o, symfile.o, linespec.o): Add completer.h
to dependencies list.
2000-12-01 01:43:47 +01:00
|
|
|
|
#include "linespec.h"
|
* completer.c (gdb_completer_loc_break_characters): New variable.
(line_completion_function): If we are completing on locations,
back up the start of word pointer past all characters which can
appear in a location spec.
(location_completer): New function.
* completer.h: Add prototype for location_completer.
* symtab.c (make_source_files_completion_list)
(add_filename_to_list, not_interesting_fname): New functions.
(filename_seen): New function, body extracted from
output_source_filename.
(output_source_filename): Call filename_seen to check if the file
was already printed.
(make_symbol_completion_list): If TEXT includes a
double-quoted string, return an empty list, not NULL.
(make_file_symbol_completion_list): New function, similar to
make_symbol_completion_list but with an additional argument
SRCFILE.
* symtab.h (make_file_symbol_completion_list)
(make_source_files_completion_list): Add prototypes.
* breakpoint.c (_initialize_breakpoint): Make location_completer
be the completion function for all commands which set breakpoints
and watchpoints.
(top-level): #include "completer.h".
* tracepoint.c (_initialize_tracepoint): Make location_completer
be the completion function for the "trace" command.
(top-level): #include "completer.h".
* printcmd.c (_initialize_printcmd): Make location_completer be
the completion function for the "print", "inspect", "call", and
"disassemble" commands.
(top-level): #include "completer.h".
* infcmd.c (_initialize_infcmd): Make location_completer be the
completion function for the "go", "jump", and "until" commands.
(top-level): #include "completer.h".
2001-06-11 18:05:25 +02:00
|
|
|
|
#include "completer.h"
|
2001-07-28 21:48:15 +02:00
|
|
|
|
#include "gdb.h"
|
2000-02-03 05:14:45 +01:00
|
|
|
|
#include "ui-out.h"
|
2002-08-27 21:06:36 +02:00
|
|
|
|
#include "cli/cli-script.h"
|
2002-11-24 04:20:09 +01:00
|
|
|
|
#include "gdb_assert.h"
|
2003-02-19 David Carlton <carlton@math.stanford.edu>
* Makefile.in (SFILES): Add block.c.
(block_h): New.
(COMMON_OBS): Add block.o.
(block.o): New.
(x86-64-tdep.o): Add $(block_h).
(values.o, valops.o, tracepoint.o, symtab.o, symmisc.o, symfile.o)
(stack.o, printcmd.o, p-exp.tab.o, parse.o, objfiles.o)
(objc-exp.tab.o, objc-lang.o, nlmread.o, mips-tdep.o, mdebugread.o)
(m2-exp.tab.o, linespec.o, jv-lang.o, jv-exp.tab.o, infcmd.o)
(f-valprint.o, findvar.o, f-exp.tab.o, expprint.o, coffread.o)
(c-exp.tab.o, buildsym.o, breakpoint.o, blockframe.o, ax-gdb.o)
(alpha-tdep.o, ada-lang.o, ada-exp.tab.o, mi-cmd-stack.o): Ditto.
* value.h: Add opaque declaration for struct block.
* parser-defs.h, objc-lang.h, buildsym.h, breakpoint.h: Ditto.
* ada-lang.h: Ditto.
* x86-64-tdep.c: #include "block.h"
* values.c, valops.c, tracepoint.c, symtab.c, symmisc.c: Ditto.
* symfile.c, stack.c, printcmd.c, p-exp.y, parse.c: Ditto.
* objfiles.c, objc-exp.y, objc-lang.c, nlmread.c: Ditto.
* mips-tdep.c, mdebugread.c, m2-exp.y, linespec.c: Ditto.
* jv-lang.c, jv-exp.y, infcmd.c, f-valprint.c: Ditto.
* findvar.c, f-exp.y, expprint.c, coffread.c, c-exp.y: Ditto.
* buildsym.c, breakpoint.c, blockframe.c, ax-gdb.c: Ditto.
* alpha-tdep.c, ada-lang.c, ada-exp.y: Ditto.
* blockframe.c (blockvector_for_pc_sect): Move to "block.c".
(blockvector_for_pc, block_for_pc_sect, block_for_pc): Ditto.
* symtab.c (block_function): Ditto.
(contained_in): Ditto.
* frame.h: Move block_for_pc and block_for_pc_sect declarations to
block.h. Add opaque declaration for struct block.
* symtab.h: Move block_function and contained_in declarations to
block.h. Add opaque declarations for struct block, struct
blockvector.
(struct block): Move to block.h.
(struct blockvector): Ditto.
(BLOCK_START, BLOCK_END, BLOCK_FUNCTION, BLOCK_SUPERBLOCK)
(BLOCK_GCC_COMPILED, BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM)
(BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE)
(ALL_BLOCK_SYMBOLS, BLOCK_SHOULD_SORT, BLOCKVECTOR_NBLOCKS)
(BLOCKVECTOR_BLOCK, GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK):
Ditto.
* block.c: New file.
* block.h: New file.
2003-02-19 David Carlton <carlton@math.stanford.edu>
* mi-cmd-stack.c: #include "block.h"
2003-02-20 01:01:07 +01:00
|
|
|
|
#include "block.h"
|
* solib.h (CLEAR_SOLIB, SOLIB_ADD)
(SOLIB_CREATE_INFERIOR_HOOK, SOLIB_REMOVE_INFERIOR_HOOK)
(SOLIB_IN_DYNAMIC_LINKER, SOLIB_RESTART)
(DISABLE_UNSETTABLE_BREAK, PC_SOLIB)
(IN_SOLIB_DYNSYM_RESOLVE_CODE): Remove defines and orphaned
comments.
* breakpoint.c: Include "solib.h".
(insert_bp_location) [!DISABLE_UNSETTABLE_BREAK]: Call
solib_address.
(remove_solib_event_breakpoints, create_solib_event_breakpoint)
(disable_breakpoints_in_shlibs)
(disable_breakpoints_in_unloaded_shlib)
(re_enable_breakpoints_in_shlibs): Compile if SOLIB_ADD isn't
defined. If PC_SOLIB isn't defined, call solib_address.
(_initialize_breakpoint): Unconditionally install observer.
* corelow.c: Include "solib.h".
[SOLIB_ADD] (solib_add_stub): Remove prototype.
(core_close) [!CLEAR_SOLIB]: Call clear_solib.
(solib_add_stub) [!SOLIB_ADD] Call solib_add.
(core_open): Unconditionally call solib_add_stub.
* fork-child.c: Include "solib.h".
(fork_inferior) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
* infcmd.c: Include "solib.h".
(attach_command) [!SOLIB_ADD]: Call shlib_rescan. Unconditionally
call re_enable_breakpoints_in_shlibs.
* infrun.c: Include "solib.h".
(SOLIB_IN_SYNSYM_RESOLVE_CODE): Don't define if not already
defined.
(stop_on_solib_events, show_stop_on_solib_events): Include
unconditionally.
(follow_exec) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
(handle_inferior_event) [!SOLIB_ADD]: Call shlib_add.
[!IN_SOLIB_DYNSYM_RESOLVE_CODE]: Call in_solib_dynsym_resolve_code.
(_initialize_infrun): Unconditionally add "stop_on_solib-events"
command.
* remote.c: Include "solib.h".
(remote_open_1): Unconditionally call no_shared_libraries.
[!SOLIB_CREATE_INFERIOR_HOOK] Call solib_create_inferior_hook.
* stack.c: Include "solib.h".
(print_frame) [!PC_SOLIB] Call shlib_for_pc.
* xcoffsolib.c (no_shared_libraries): Remove function.
* Makefile.in (SFILES): Add solib.c.
(ALLDEPFILES): Remove solib.c.
(COMMON_OBS): Add solib.o.
(breakpoint.o, corelow.o, fork-chiled.o, infcmd.o, infrun.o)
(remote.o, stack.o): Update dependencies.
2005-05-12 22:21:18 +02:00
|
|
|
|
#include "solib.h"
|
2004-09-01 20:00:29 +02:00
|
|
|
|
#include "solist.h"
|
|
|
|
|
#include "observer.h"
|
2005-01-12 Andrew Cagney <cagney@gnu.org>
* exceptions.h (enum return_reason, RETURN_MASK)
(RETURN_MASK_QUIT, RETURN_MASK_ERROR, RETURN_MASK_ALL)
(return_mask, throw_exception, catch_exceptions_ftype)
(catch_exceptions_with_msg, catch_errors_ftype, catch_errors)
(catch_command_errors_ftype, catch_command_errors): Move to
exceptions.h.
* exceptions.c, exceptions.h: New files.
* top.c: Do not include <setjmp.h>.
(SIGJMP_BUF, SIGSETJMP, SIGLONGJMP, catch_return)
(throw_exception, catcher, catch_exceptions)
(catch_exceptions_with_msg, struct catch_errors_args)
(do_catch_errors, catch_errors, struct captured_command_args)
(do_captured_command, catch_command_errors): Move to exceptions.c.
* wrapper.c, wince.c, win32-nat.c, utils.c: Include "exceptions.h".
* tui/tui-interp.c, top.c, thread.c, symmisc.c: Ditto.
* symfile-mem.c, stack.c, solib.c, rs6000-nat.c: Ditto.
* remote-sds.c, remote-mips.c, remote-fileio.c: Ditto.
* remote-e7000.c, objc-lang.c, ocd.c: Ditto.
* remote.c, nto-procfs.c, monitor.c, mi/mi-main.c: Ditto.
* main.c, m32r-rom.c, infrun.c, inf-loop.c: Ditto.
* hppa-hpux-tdep.c, frame.c, event-top.c, event-loop.c: Ditto.
* corelow.c, corefile.c, cli/cli-interp.c, breakpoint.c: Ditto.
* ada-valprint.c, ada-lang.c: Ditto.
* Makefile.in (HFILES_NO_SRCDIR, COMMON_OBS): Add exceptions.h and
exceptions.o. Update all dependencies.
2005-01-12 19:31:35 +01:00
|
|
|
|
#include "exceptions.h"
|
2006-11-22 11:43:34 +01:00
|
|
|
|
#include "memattr.h"
|
* ada-lang.h (ada_find_printable_frame): Remove.
(ada_exception_catchpoint_p, ada_decode_exception_location)
(ada_decode_assert_location): Add declaration.
* ada-lang.c: Add include of annotate.h and valprint.h.
(exception_catchpoint_kind): New enum.
(function_name_from_pc, is_known_support_routine)
(ada_find_printable_frame, ada_unhandled_exception_name_addr)
(ada_exception_name_addr_1, ada_exception_name_addr)
(print_it_exception, print_one_exception, print_mention_exception)
(print_it_catch_exception, print_one_catch_exception)
(print_mention_catch_exception, catch_exception_breakpoint_ops)
(print_it_catch_exception_unhandled)
(print_one_catch_exception_unhandled)
(print_mention_catch_exception_unhandled, print_it_catch_assert)
(print_one_catch_assert, print_mention_catch_assert)
(ada_exception_catchpoint_p, error_breakpoint_runtime_sym_not_found)
(ada_get_next_arg, catch_ada_exception_command_split)
(ada_exception_sym_name, ada_exception_sym_name)
(ada_exception_breakption_ops, ada_exception_catchpoint_cond_string)
(ada_parse_catchpoint_condition, ada_exception_sal)
(ada_decode_exception_location)
(ada_decode_assert_location): New function.
(catch_exception_unhandled_breakpoint_ops): New global variable.
(catch_assert_breakpoint_ops): New global variable.
* breakpoint.c: Add include of ada-lang.h.
(print_one_breakpoint): Do not print the condition for Ada
exception catchpoints.
(create_ada_exception_breakpoint): New function.
(catch_ada_exception_command, catch_assert_command): New function.
(catch_command_1): Add support for the new "catch exception" and
"catch assert" commands.
(_initialize_breakpoint): Add help description for the new catch
commands.
* Makefile.in (ada-lang.o): Add dependency on annotate.h and
valprint.h.
(breakpoint.o): Add dependency on ada-lang.h.
2007-01-04 06:27:31 +01:00
|
|
|
|
#include "ada-lang.h"
|
2007-07-11 00:59:42 +02:00
|
|
|
|
#include "top.h"
|
2008-03-03 14:24:12 +01:00
|
|
|
|
#include "wrapper.h"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-08-31 03:14:27 +02:00
|
|
|
|
#include "gdb-events.h"
|
2005-05-29 05:13:19 +02:00
|
|
|
|
#include "mi/mi-common.h"
|
1999-08-31 03:14:27 +02:00
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
#include "gdb_stdint.h"
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Prototypes for local functions. */
|
|
|
|
|
|
2008-04-24 13:13:44 +02:00
|
|
|
|
static void until_break_command_continuation (struct continuation_arg *arg,
|
|
|
|
|
int error);
|
1999-09-22 05:28:34 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void catch_command_1 (char *, int, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void enable_delete_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void enable_delete_breakpoint (struct breakpoint *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void enable_once_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void enable_once_breakpoint (struct breakpoint *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void disable_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void enable_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void map_breakpoint_numbers (char *, void (*)(struct breakpoint *));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void ignore_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
* breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto.
* defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto.
* exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto.
* objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto.
* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
2003-01-18 16:55:53 +01:00
|
|
|
|
static int breakpoint_re_set_one (void *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void clear_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void catch_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void watch_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static int can_use_hardware_watchpoint (struct value *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2008-02-01 17:24:47 +01:00
|
|
|
|
static void break_command_1 (char *, int, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void mention (struct breakpoint *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2001-05-11 21:46:35 +02:00
|
|
|
|
struct breakpoint *set_raw_breakpoint (struct symtab_and_line, enum bptype);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2001-05-06 02:52:07 +02:00
|
|
|
|
static void check_duplicates (struct breakpoint *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-10-14 01:53:20 +02:00
|
|
|
|
static void breakpoint_adjustment_warning (CORE_ADDR, CORE_ADDR, int, int);
|
|
|
|
|
|
2004-03-19 21:49:43 +01:00
|
|
|
|
static CORE_ADDR adjust_breakpoint_address (CORE_ADDR bpaddr,
|
|
|
|
|
enum bptype bptype);
|
2003-10-14 01:53:20 +02:00
|
|
|
|
|
2006-10-19 17:58:25 +02:00
|
|
|
|
static void describe_other_breakpoints (CORE_ADDR, asection *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void breakpoints_info (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void breakpoint_1 (int, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2007-11-15 07:52:53 +01:00
|
|
|
|
static bpstat bpstat_alloc (const struct bp_location *, bpstat);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
* breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto.
* defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto.
* exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto.
* objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto.
* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
2003-01-18 16:55:53 +01:00
|
|
|
|
static int breakpoint_cond_eval (void *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
* breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto.
* defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto.
* exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto.
* objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto.
* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
2003-01-18 16:55:53 +01:00
|
|
|
|
static void cleanup_executing_breakpoints (void *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void commands_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void condition_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static int get_number_trailer (char **, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
void set_breakpoint_count (int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
mark_inserted,
|
|
|
|
|
mark_uninserted
|
|
|
|
|
}
|
|
|
|
|
insertion_state_t;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-11-06 19:28:33 +01:00
|
|
|
|
static int remove_breakpoint (struct bp_location *, insertion_state_t);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static enum print_stop_action print_it_typical (bpstat);
|
1999-10-26 05:43:48 +02:00
|
|
|
|
|
|
|
|
|
static enum print_stop_action print_bp_stop_message (bpstat bs);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
* breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto.
* defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto.
* exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto.
* objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto.
* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
2003-01-18 16:55:53 +01:00
|
|
|
|
static int watchpoint_check (void *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void maintenance_info_breakpoints (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void create_longjmp_breakpoint (char *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2002-02-06 19:31:07 +01:00
|
|
|
|
static void create_overlay_event_breakpoint (char *);
|
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static int hw_breakpoint_used_count (void);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static int hw_watchpoint_used_count (enum bptype, int *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void hbreak_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void thbreak_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void watch_command_1 (char *, int, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void rwatch_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void awatch_command (char *, int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void do_enable_breakpoint (struct breakpoint *, enum bpdisp);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void create_fork_vfork_event_catchpoint (int tempflag,
|
|
|
|
|
char *cond_string,
|
|
|
|
|
enum bptype bp_kind);
|
1999-04-26 20:34:20 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void stop_command (char *arg, int from_tty);
|
1999-04-26 20:34:20 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void stopin_command (char *arg, int from_tty);
|
1999-04-26 20:34:20 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void stopat_command (char *arg, int from_tty);
|
1999-04-26 20:34:20 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static char *ep_find_event_name_end (char *arg);
|
1999-04-26 20:34:20 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static char *ep_parse_optional_if_clause (char **arg);
|
1999-04-26 20:34:20 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static char *ep_parse_optional_filename (char **arg);
|
1999-04-26 20:34:20 +02:00
|
|
|
|
|
2001-03-01 04:50:17 +01:00
|
|
|
|
static void catch_exception_command_1 (enum exception_event_kind ex_event,
|
|
|
|
|
char *arg, int tempflag, int from_tty);
|
1999-04-26 20:34:20 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void tcatch_command (char *arg, int from_tty);
|
1999-04-26 20:34:20 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void ep_skip_leading_whitespace (char **s);
|
1999-04-26 20:34:20 +02:00
|
|
|
|
|
2007-05-11 14:44:34 +02:00
|
|
|
|
static int single_step_breakpoint_inserted_here_p (CORE_ADDR pc);
|
|
|
|
|
|
2007-09-22 21:33:32 +02:00
|
|
|
|
static void free_bp_location (struct bp_location *loc);
|
|
|
|
|
|
2007-11-15 07:46:21 +01:00
|
|
|
|
static void mark_breakpoints_out (void);
|
|
|
|
|
|
2008-01-29 18:52:47 +01:00
|
|
|
|
static struct bp_location *
|
|
|
|
|
allocate_bp_location (struct breakpoint *bpt, enum bptype bp_type);
|
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
static void update_global_location_list (void);
|
2008-01-29 18:52:47 +01:00
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
static void update_global_location_list_nothrow (void);
|
|
|
|
|
|
|
|
|
|
static int is_hardware_watchpoint (struct breakpoint *bpt);
|
|
|
|
|
|
|
|
|
|
static void insert_breakpoint_locations (void);
|
2008-01-29 18:52:47 +01:00
|
|
|
|
|
2008-04-15 16:32:12 +02:00
|
|
|
|
static const char *
|
|
|
|
|
bpdisp_text (enum bpdisp disp)
|
|
|
|
|
{
|
|
|
|
|
/* NOTE: the following values are a part of MI protocol and represent
|
|
|
|
|
values of 'disp' field returned when inferior stops at a breakpoint. */
|
|
|
|
|
static char *bpdisps[] = {"del", "dstp", "dis", "keep"};
|
|
|
|
|
return bpdisps[(int) disp];
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2008-04-15 16:32:12 +02:00
|
|
|
|
/* Prototypes for exported functions. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* If FALSE, gdb will not use hardware support for watchpoints, even
|
|
|
|
|
if such is available. */
|
|
|
|
|
static int can_use_hw_watchpoints;
|
|
|
|
|
|
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 14:51:36 +01:00
|
|
|
|
static void
|
|
|
|
|
show_can_use_hw_watchpoints (struct ui_file *file, int from_tty,
|
|
|
|
|
struct cmd_list_element *c,
|
|
|
|
|
const char *value)
|
|
|
|
|
{
|
|
|
|
|
fprintf_filtered (file, _("\
|
|
|
|
|
Debugger's willingness to use watchpoint hardware is %s.\n"),
|
|
|
|
|
value);
|
|
|
|
|
}
|
|
|
|
|
|
2004-02-27 00:46:47 +01:00
|
|
|
|
/* If AUTO_BOOLEAN_FALSE, gdb will not attempt to create pending breakpoints.
|
|
|
|
|
If AUTO_BOOLEAN_TRUE, gdb will automatically create pending breakpoints
|
|
|
|
|
for unrecognized breakpoint locations.
|
|
|
|
|
If AUTO_BOOLEAN_AUTO, gdb will query when breakpoints are unrecognized. */
|
|
|
|
|
static enum auto_boolean pending_break_support;
|
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 14:51:36 +01:00
|
|
|
|
static void
|
|
|
|
|
show_pending_break_support (struct ui_file *file, int from_tty,
|
|
|
|
|
struct cmd_list_element *c,
|
|
|
|
|
const char *value)
|
|
|
|
|
{
|
|
|
|
|
fprintf_filtered (file, _("\
|
|
|
|
|
Debugger's behavior regarding pending breakpoints is %s.\n"),
|
|
|
|
|
value);
|
|
|
|
|
}
|
2004-02-27 00:46:47 +01:00
|
|
|
|
|
2006-11-22 11:43:34 +01:00
|
|
|
|
/* If 1, gdb will automatically use hardware breakpoints for breakpoints
|
|
|
|
|
set with "break" but falling in read-only memory.
|
|
|
|
|
If 0, gdb will warn about such breakpoints, but won't automatically
|
|
|
|
|
use hardware breakpoints. */
|
|
|
|
|
static int automatic_hardware_breakpoints;
|
|
|
|
|
static void
|
|
|
|
|
show_automatic_hardware_breakpoints (struct ui_file *file, int from_tty,
|
|
|
|
|
struct cmd_list_element *c,
|
|
|
|
|
const char *value)
|
|
|
|
|
{
|
|
|
|
|
fprintf_filtered (file, _("\
|
|
|
|
|
Automatic usage of hardware breakpoints is %s.\n"),
|
|
|
|
|
value);
|
|
|
|
|
}
|
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
/* If 1, gdb will keep breakpoints inserted even as inferior is stopped,
|
|
|
|
|
and immediately insert any new breakpoints. If 0, gdb will insert
|
|
|
|
|
breakpoints into inferior only when resuming it, and will remove
|
|
|
|
|
breakpoints upon stop. */
|
|
|
|
|
static int always_inserted_mode = 0;
|
|
|
|
|
static void
|
|
|
|
|
show_always_inserted_mode (struct ui_file *file, int from_tty,
|
|
|
|
|
struct cmd_list_element *c, const char *value)
|
|
|
|
|
{
|
|
|
|
|
fprintf_filtered (file, _("Always inserted breakpoint mode is %s.\n"), value);
|
|
|
|
|
}
|
|
|
|
|
|
2006-11-22 11:43:34 +01:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
void _initialize_breakpoint (void);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
extern int addressprint; /* Print machine addresses? */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Are we executing breakpoint commands? */
|
|
|
|
|
static int executing_breakpoint_commands;
|
|
|
|
|
|
2002-04-05 04:35:26 +02:00
|
|
|
|
/* Are overlay event breakpoints enabled? */
|
|
|
|
|
static int overlay_events_enabled;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Walk the following statement or block through all breakpoints.
|
|
|
|
|
ALL_BREAKPOINTS_SAFE does so even if the statment deletes the current
|
|
|
|
|
breakpoint. */
|
|
|
|
|
|
1999-11-02 05:44:47 +01:00
|
|
|
|
#define ALL_BREAKPOINTS(B) for (B = breakpoint_chain; B; B = B->next)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-11-02 05:44:47 +01:00
|
|
|
|
#define ALL_BREAKPOINTS_SAFE(B,TMP) \
|
|
|
|
|
for (B = breakpoint_chain; \
|
|
|
|
|
B ? (TMP=B->next, 1): 0; \
|
|
|
|
|
B = TMP)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-11-06 18:26:18 +01:00
|
|
|
|
/* Similar iterators for the low-level breakpoints. */
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
#define ALL_BP_LOCATIONS(B) for (B = bp_location_chain; B; B = B->global_next)
|
2003-11-06 18:26:18 +01:00
|
|
|
|
|
|
|
|
|
#define ALL_BP_LOCATIONS_SAFE(B,TMP) \
|
|
|
|
|
for (B = bp_location_chain; \
|
2007-09-23 09:56:22 +02:00
|
|
|
|
B ? (TMP=B->global_next, 1): 0; \
|
2003-11-06 18:26:18 +01:00
|
|
|
|
B = TMP)
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* True if breakpoint hit counts should be displayed in breakpoint info. */
|
|
|
|
|
|
|
|
|
|
int show_breakpoint_hit_counts = 1;
|
|
|
|
|
|
2003-11-06 18:26:18 +01:00
|
|
|
|
/* Chains of all breakpoints defined. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
struct breakpoint *breakpoint_chain;
|
|
|
|
|
|
2003-11-06 18:26:18 +01:00
|
|
|
|
struct bp_location *bp_location_chain;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Number of last breakpoint made. */
|
|
|
|
|
|
|
|
|
|
int breakpoint_count;
|
|
|
|
|
|
|
|
|
|
/* This function returns a pointer to the string representation of the
|
|
|
|
|
pathname of the dynamically-linked library that has just been
|
|
|
|
|
loaded.
|
|
|
|
|
|
|
|
|
|
This function must be used only when SOLIB_HAVE_LOAD_EVENT is TRUE,
|
|
|
|
|
or undefined results are guaranteed.
|
|
|
|
|
|
|
|
|
|
This string's contents are only valid immediately after the
|
|
|
|
|
inferior has stopped in the dynamic linker hook, and becomes
|
|
|
|
|
invalid as soon as the inferior is continued. Clients should make
|
|
|
|
|
a copy of this string if they wish to continue the inferior and
|
|
|
|
|
then access the string. */
|
|
|
|
|
|
|
|
|
|
#ifndef SOLIB_LOADED_LIBRARY_PATHNAME
|
|
|
|
|
#define SOLIB_LOADED_LIBRARY_PATHNAME(pid) ""
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* This function returns a pointer to the string representation of the
|
|
|
|
|
pathname of the dynamically-linked library that has just been
|
|
|
|
|
unloaded.
|
|
|
|
|
|
|
|
|
|
This function must be used only when SOLIB_HAVE_UNLOAD_EVENT is
|
|
|
|
|
TRUE, or undefined results are guaranteed.
|
|
|
|
|
|
|
|
|
|
This string's contents are only valid immediately after the
|
|
|
|
|
inferior has stopped in the dynamic linker hook, and becomes
|
|
|
|
|
invalid as soon as the inferior is continued. Clients should make
|
|
|
|
|
a copy of this string if they wish to continue the inferior and
|
|
|
|
|
then access the string. */
|
|
|
|
|
|
|
|
|
|
#ifndef SOLIB_UNLOADED_LIBRARY_PATHNAME
|
|
|
|
|
#define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) ""
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* This function is called by the "catch load" command. It allows the
|
|
|
|
|
debugger to be notified by the dynamic linker when a specified
|
|
|
|
|
library file (or any library file, if filename is NULL) is loaded. */
|
|
|
|
|
|
|
|
|
|
#ifndef SOLIB_CREATE_CATCH_LOAD_HOOK
|
|
|
|
|
#define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag,filename,cond_string) \
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("catch of library loads not yet implemented on this platform"))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* This function is called by the "catch unload" command. It allows
|
|
|
|
|
the debugger to be notified by the dynamic linker when a specified
|
|
|
|
|
library file (or any library file, if filename is NULL) is
|
|
|
|
|
unloaded. */
|
|
|
|
|
|
|
|
|
|
#ifndef SOLIB_CREATE_CATCH_UNLOAD_HOOK
|
2005-01-14 00:35:54 +01:00
|
|
|
|
#define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid, tempflag, filename, cond_string) \
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("catch of library unloads not yet implemented on this platform"))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
#endif
|
|
|
|
|
|
2003-12-12 20:04:46 +01:00
|
|
|
|
/* Return whether a breakpoint is an active enabled breakpoint. */
|
|
|
|
|
static int
|
|
|
|
|
breakpoint_enabled (struct breakpoint *b)
|
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
return (b->enable_state == bp_enabled);
|
2003-12-12 20:04:46 +01:00
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Set breakpoint count to NUM. */
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
set_breakpoint_count (int num)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
breakpoint_count = num;
|
|
|
|
|
set_internalvar (lookup_internalvar ("bpnum"),
|
|
|
|
|
value_from_longest (builtin_type_int, (LONGEST) num));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Used in run_command to zero the hit count when a new run starts. */
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
clear_breakpoint_hit_counts (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
b->hit_count = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Default address, symtab and line to put a breakpoint at
|
|
|
|
|
for "break" command with no arg.
|
|
|
|
|
if default_breakpoint_valid is zero, the other three are
|
|
|
|
|
not valid, and "break" with no arg is an error.
|
|
|
|
|
|
|
|
|
|
This set by print_stack_frame, which calls set_default_breakpoint. */
|
|
|
|
|
|
|
|
|
|
int default_breakpoint_valid;
|
|
|
|
|
CORE_ADDR default_breakpoint_address;
|
|
|
|
|
struct symtab *default_breakpoint_symtab;
|
|
|
|
|
int default_breakpoint_line;
|
|
|
|
|
|
|
|
|
|
/* *PP is a string denoting a breakpoint. Get the number of the breakpoint.
|
|
|
|
|
Advance *PP after the string and any trailing whitespace.
|
|
|
|
|
|
|
|
|
|
Currently the string can either be a number or "$" followed by the name
|
|
|
|
|
of a convenience variable. Making it an expression wouldn't work well
|
1999-11-02 05:44:47 +01:00
|
|
|
|
for map_breakpoint_numbers (e.g. "4 + 5 + 6").
|
2007-01-27 13:30:46 +01:00
|
|
|
|
|
|
|
|
|
If the string is a NULL pointer, that denotes the last breakpoint.
|
1999-11-02 05:44:47 +01:00
|
|
|
|
|
|
|
|
|
TRAILER is a character which can be found after the number; most
|
|
|
|
|
commonly this is `-'. If you don't want a trailer, use \0. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
static int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
get_number_trailer (char **pp, int trailer)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-11-02 05:44:47 +01:00
|
|
|
|
int retval = 0; /* default */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
char *p = *pp;
|
|
|
|
|
|
|
|
|
|
if (p == NULL)
|
|
|
|
|
/* Empty line means refer to the last breakpoint. */
|
|
|
|
|
return breakpoint_count;
|
|
|
|
|
else if (*p == '$')
|
|
|
|
|
{
|
|
|
|
|
/* Make a copy of the name, so we can null-terminate it
|
1999-07-07 22:19:36 +02:00
|
|
|
|
to pass to lookup_internalvar(). */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
char *varname;
|
|
|
|
|
char *start = ++p;
|
2001-10-21 01:54:29 +02:00
|
|
|
|
struct value *val;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
while (isalnum (*p) || *p == '_')
|
|
|
|
|
p++;
|
|
|
|
|
varname = (char *) alloca (p - start + 1);
|
|
|
|
|
strncpy (varname, start, p - start);
|
|
|
|
|
varname[p - start] = '\0';
|
|
|
|
|
val = value_of_internalvar (lookup_internalvar (varname));
|
2004-11-12 Andrew Cagney <cagney@gnu.org>
* value.h (VALUE_TYPE, VALUE_NEXT, VALUE_OFFSET, VALUE_BITSIZE)
(VALUE_BITPOS): Delete.
(value_type, value_offset, value_bitsize, value_bitpos): Declare.
* value.c (value_type, value_offset, value_bitpos)
(value_bitsize): New functions. Update references.
* arm-tdep.c, gnu-v3-abi.c, hpacc-abi.c, gnu-v2-abi.c: Update.
* f-valprint.c, cp-valprint.c, c-valprint.c: Update.
* ada-valprint.c, typeprint.c, scm-valprint.c, scm-exp.c: Update.
* p-valprint.c, jv-valprint.c, jv-lang.c, varobj.c: Update.
* objc-lang.c, ada-lang.c, std-regs.c, stack.c: Update.
* infcall.c, linespec.c, printcmd.c, valarith.c: Update.
* valops.c, eval.c, findvar.c, breakpoint.c: Update.
* tracepoint.c, ax-gdb.c, mi/mi-main.c, cli/cli-dump.c:
* rs6000-tdep.c, ppc-sysv-tdep.c: Update.
2004-11-12 22:45:08 +01:00
|
|
|
|
if (TYPE_CODE (value_type (val)) == TYPE_CODE_INT)
|
1999-11-02 05:44:47 +01:00
|
|
|
|
retval = (int) value_as_long (val);
|
|
|
|
|
else
|
|
|
|
|
{
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Convenience variable must have integer value.\n"));
|
1999-11-02 05:44:47 +01:00
|
|
|
|
retval = 0;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (*p == '-')
|
|
|
|
|
++p;
|
|
|
|
|
while (*p >= '0' && *p <= '9')
|
|
|
|
|
++p;
|
|
|
|
|
if (p == *pp)
|
|
|
|
|
/* There is no number here. (e.g. "cond a == b"). */
|
1999-11-02 05:44:47 +01:00
|
|
|
|
{
|
|
|
|
|
/* Skip non-numeric token */
|
|
|
|
|
while (*p && !isspace((int) *p))
|
|
|
|
|
++p;
|
|
|
|
|
/* Return zero, which caller must interpret as error. */
|
|
|
|
|
retval = 0;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
retval = atoi (*pp);
|
|
|
|
|
}
|
|
|
|
|
if (!(isspace (*p) || *p == '\0' || *p == trailer))
|
|
|
|
|
{
|
|
|
|
|
/* Trailing junk: return 0 and let caller print error msg. */
|
|
|
|
|
while (!(isspace (*p) || *p == '\0' || *p == trailer))
|
|
|
|
|
++p;
|
|
|
|
|
retval = 0;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
while (isspace (*p))
|
|
|
|
|
p++;
|
|
|
|
|
*pp = p;
|
|
|
|
|
return retval;
|
|
|
|
|
}
|
1999-11-02 05:44:47 +01:00
|
|
|
|
|
1999-11-09 02:23:30 +01:00
|
|
|
|
|
1999-11-02 05:44:47 +01:00
|
|
|
|
/* Like get_number_trailer, but don't allow a trailer. */
|
|
|
|
|
int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
get_number (char **pp)
|
1999-11-02 05:44:47 +01:00
|
|
|
|
{
|
|
|
|
|
return get_number_trailer (pp, '\0');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Parse a number or a range.
|
|
|
|
|
* A number will be of the form handled by get_number.
|
|
|
|
|
* A range will be of the form <number1> - <number2>, and
|
|
|
|
|
* will represent all the integers between number1 and number2,
|
|
|
|
|
* inclusive.
|
|
|
|
|
*
|
|
|
|
|
* While processing a range, this fuction is called iteratively;
|
|
|
|
|
* At each call it will return the next value in the range.
|
|
|
|
|
*
|
|
|
|
|
* At the beginning of parsing a range, the char pointer PP will
|
|
|
|
|
* be advanced past <number1> and left pointing at the '-' token.
|
|
|
|
|
* Subsequent calls will not advance the pointer until the range
|
|
|
|
|
* is completed. The call that completes the range will advance
|
|
|
|
|
* pointer PP past <number2>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
get_number_or_range (char **pp)
|
1999-11-02 05:44:47 +01:00
|
|
|
|
{
|
|
|
|
|
static int last_retval, end_value;
|
|
|
|
|
static char *end_ptr;
|
|
|
|
|
static int in_range = 0;
|
|
|
|
|
|
|
|
|
|
if (**pp != '-')
|
|
|
|
|
{
|
|
|
|
|
/* Default case: pp is pointing either to a solo number,
|
|
|
|
|
or to the first number of a range. */
|
|
|
|
|
last_retval = get_number_trailer (pp, '-');
|
|
|
|
|
if (**pp == '-')
|
|
|
|
|
{
|
|
|
|
|
char **temp;
|
|
|
|
|
|
|
|
|
|
/* This is the start of a range (<number1> - <number2>).
|
|
|
|
|
Skip the '-', parse and remember the second number,
|
|
|
|
|
and also remember the end of the final token. */
|
|
|
|
|
|
|
|
|
|
temp = &end_ptr;
|
|
|
|
|
end_ptr = *pp + 1;
|
|
|
|
|
while (isspace ((int) *end_ptr))
|
|
|
|
|
end_ptr++; /* skip white space */
|
|
|
|
|
end_value = get_number (temp);
|
|
|
|
|
if (end_value < last_retval)
|
|
|
|
|
{
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("inverted range"));
|
1999-11-02 05:44:47 +01:00
|
|
|
|
}
|
|
|
|
|
else if (end_value == last_retval)
|
|
|
|
|
{
|
|
|
|
|
/* degenerate range (number1 == number2). Advance the
|
|
|
|
|
token pointer so that the range will be treated as a
|
|
|
|
|
single number. */
|
|
|
|
|
*pp = end_ptr;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
in_range = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (! in_range)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("negative value"));
|
1999-11-02 05:44:47 +01:00
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* pp points to the '-' that betokens a range. All
|
|
|
|
|
number-parsing has already been done. Return the next
|
|
|
|
|
integer value (one greater than the saved previous value).
|
|
|
|
|
Do not advance the token pointer 'pp' until the end of range
|
|
|
|
|
is reached. */
|
|
|
|
|
|
|
|
|
|
if (++last_retval == end_value)
|
|
|
|
|
{
|
|
|
|
|
/* End of range reached; advance token pointer. */
|
|
|
|
|
*pp = end_ptr;
|
|
|
|
|
in_range = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return last_retval;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* condition N EXP -- set break condition of breakpoint N to EXP. */
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
condition_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
char *p;
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
int bnum;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
if (arg == 0)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
error_no_arg (_("breakpoint number"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
p = arg;
|
|
|
|
|
bnum = get_number (&p);
|
1999-11-02 05:44:47 +01:00
|
|
|
|
if (bnum == 0)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Bad breakpoint argument: '%s'"), arg);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->number == bnum)
|
2008-04-26 07:43:45 +02:00
|
|
|
|
{
|
|
|
|
|
struct bp_location *loc = b->loc;
|
|
|
|
|
for (; loc; loc = loc->next)
|
|
|
|
|
{
|
|
|
|
|
if (loc->cond)
|
|
|
|
|
{
|
|
|
|
|
xfree (loc->cond);
|
|
|
|
|
loc->cond = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (b->cond_string != NULL)
|
|
|
|
|
xfree (b->cond_string);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2008-04-26 07:43:45 +02:00
|
|
|
|
if (*p == 0)
|
|
|
|
|
{
|
|
|
|
|
b->cond_string = NULL;
|
|
|
|
|
if (from_tty)
|
|
|
|
|
printf_filtered (_("Breakpoint %d now unconditional.\n"), bnum);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
arg = p;
|
|
|
|
|
/* I don't know if it matters whether this is the string the user
|
|
|
|
|
typed in or the decompiled expression. */
|
|
|
|
|
b->cond_string = savestring (arg, strlen (arg));
|
|
|
|
|
b->condition_not_parsed = 0;
|
|
|
|
|
for (loc = b->loc; loc; loc = loc->next)
|
|
|
|
|
{
|
|
|
|
|
arg = p;
|
|
|
|
|
loc->cond =
|
|
|
|
|
parse_exp_1 (&arg, block_for_pc (loc->address), 0);
|
|
|
|
|
if (*arg)
|
|
|
|
|
error (_("Junk at end of expression"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
breakpoints_changed ();
|
|
|
|
|
breakpoint_modify_event (b->number);
|
|
|
|
|
return;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("No breakpoint number %d."), bnum);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
commands_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
char *p;
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
int bnum;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
struct command_line *l;
|
|
|
|
|
|
|
|
|
|
/* If we allowed this, we would have problems with when to
|
|
|
|
|
free the storage, if we change the commands currently
|
|
|
|
|
being read from. */
|
|
|
|
|
|
|
|
|
|
if (executing_breakpoint_commands)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Can't use the \"commands\" command among a breakpoint's commands."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
p = arg;
|
|
|
|
|
bnum = get_number (&p);
|
1999-11-02 05:44:47 +01:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (p && *p)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Unexpected extra arguments following breakpoint number."));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->number == bnum)
|
2003-08-09 16:57:30 +02:00
|
|
|
|
{
|
|
|
|
|
char *tmpbuf = xstrprintf ("Type commands for when breakpoint %d is hit, one per line.",
|
|
|
|
|
bnum);
|
|
|
|
|
struct cleanup *cleanups = make_cleanup (xfree, tmpbuf);
|
|
|
|
|
l = read_command_lines (tmpbuf, from_tty);
|
|
|
|
|
do_cleanups (cleanups);
|
|
|
|
|
free_command_lines (&b->commands);
|
|
|
|
|
b->commands = l;
|
|
|
|
|
breakpoints_changed ();
|
|
|
|
|
breakpoint_modify_event (b->number);
|
|
|
|
|
return;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("No breakpoint number %d."), bnum);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2007-01-27 13:30:46 +01:00
|
|
|
|
|
|
|
|
|
/* Like commands_command, but instead of reading the commands from
|
|
|
|
|
input stream, takes them from an already parsed command structure.
|
|
|
|
|
|
|
|
|
|
This is used by cli-script.c to DTRT with breakpoint commands
|
|
|
|
|
that are part of if and while bodies. */
|
|
|
|
|
enum command_control_type
|
|
|
|
|
commands_from_control_command (char *arg, struct command_line *cmd)
|
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
char *p;
|
|
|
|
|
int bnum;
|
|
|
|
|
|
|
|
|
|
/* If we allowed this, we would have problems with when to
|
|
|
|
|
free the storage, if we change the commands currently
|
|
|
|
|
being read from. */
|
|
|
|
|
|
|
|
|
|
if (executing_breakpoint_commands)
|
|
|
|
|
error (_("Can't use the \"commands\" command among a breakpoint's commands."));
|
|
|
|
|
|
|
|
|
|
/* An empty string for the breakpoint number means the last
|
|
|
|
|
breakpoint, but get_number expects a NULL pointer. */
|
|
|
|
|
if (arg && !*arg)
|
|
|
|
|
p = NULL;
|
|
|
|
|
else
|
|
|
|
|
p = arg;
|
|
|
|
|
bnum = get_number (&p);
|
|
|
|
|
|
|
|
|
|
if (p && *p)
|
|
|
|
|
error (_("Unexpected extra arguments following breakpoint number."));
|
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->number == bnum)
|
|
|
|
|
{
|
|
|
|
|
free_command_lines (&b->commands);
|
|
|
|
|
if (cmd->body_count != 1)
|
|
|
|
|
error (_("Invalid \"commands\" block structure."));
|
|
|
|
|
/* We need to copy the commands because if/while will free the
|
|
|
|
|
list after it finishes execution. */
|
|
|
|
|
b->commands = copy_command_lines (cmd->body_list[0]);
|
|
|
|
|
breakpoints_changed ();
|
|
|
|
|
breakpoint_modify_event (b->number);
|
|
|
|
|
return simple_control;
|
2008-04-26 07:43:45 +02:00
|
|
|
|
}
|
2007-01-27 13:30:46 +01:00
|
|
|
|
error (_("No breakpoint number %d."), bnum);
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
* breakpoint.h (breakpoint_restore_shadows): New
declaration.
* breakpoint.c (breakpoint_restore_shadows): New.
(read_memory_nobpt): Delete.
* gdbcore.h (read_memory_nobpt): Delete declaration.
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
(make_show_memory_beakpoints_cleanup): New.
(show_memory_breakpoints): New.
* target.h (make_show_memory_beakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
* alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
2008-03-13 13:22:14 +01:00
|
|
|
|
/* Update BUF, which is LEN bytes read from the target address MEMADDR,
|
|
|
|
|
by replacing any memory breakpoints with their shadowed contents. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
* breakpoint.h (breakpoint_restore_shadows): New
declaration.
* breakpoint.c (breakpoint_restore_shadows): New.
(read_memory_nobpt): Delete.
* gdbcore.h (read_memory_nobpt): Delete declaration.
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
(make_show_memory_beakpoints_cleanup): New.
(show_memory_breakpoints): New.
* target.h (make_show_memory_beakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
* alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
2008-03-13 13:22:14 +01:00
|
|
|
|
void
|
|
|
|
|
breakpoint_restore_shadows (gdb_byte *buf, ULONGEST memaddr, LONGEST len)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
* breakpoint.h (breakpoint_restore_shadows): New
declaration.
* breakpoint.c (breakpoint_restore_shadows): New.
(read_memory_nobpt): Delete.
* gdbcore.h (read_memory_nobpt): Delete declaration.
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
(make_show_memory_beakpoints_cleanup): New.
(show_memory_breakpoints): New.
* target.h (make_show_memory_beakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
* alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
2008-03-13 13:22:14 +01:00
|
|
|
|
struct bp_location *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
CORE_ADDR bp_addr = 0;
|
|
|
|
|
int bp_size = 0;
|
* breakpoint.h (breakpoint_restore_shadows): New
declaration.
* breakpoint.c (breakpoint_restore_shadows): New.
(read_memory_nobpt): Delete.
* gdbcore.h (read_memory_nobpt): Delete declaration.
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
(make_show_memory_beakpoints_cleanup): New.
(show_memory_breakpoints): New.
* target.h (make_show_memory_beakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
* alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
2008-03-13 13:22:14 +01:00
|
|
|
|
int bptoffset = 0;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2003-11-06 19:22:45 +01:00
|
|
|
|
ALL_BP_LOCATIONS (b)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2003-11-06 19:22:45 +01:00
|
|
|
|
if (b->owner->type == bp_none)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("reading through apparently deleted breakpoint #%d?"),
|
2003-11-06 19:22:45 +01:00
|
|
|
|
b->owner->number);
|
|
|
|
|
|
|
|
|
|
if (b->loc_type != bp_loc_software_breakpoint)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
continue;
|
2003-11-06 19:22:45 +01:00
|
|
|
|
if (!b->inserted)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
continue;
|
|
|
|
|
/* Addresses and length of the part of the breakpoint that
|
|
|
|
|
we need to copy. */
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
bp_addr = b->target_info.placed_address;
|
|
|
|
|
bp_size = b->target_info.shadow_len;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (bp_size == 0)
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
/* bp isn't valid, or doesn't shadow memory. */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
continue;
|
* breakpoint.h (breakpoint_restore_shadows): New
declaration.
* breakpoint.c (breakpoint_restore_shadows): New.
(read_memory_nobpt): Delete.
* gdbcore.h (read_memory_nobpt): Delete declaration.
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
(make_show_memory_beakpoints_cleanup): New.
(show_memory_breakpoints): New.
* target.h (make_show_memory_beakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
* alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
2008-03-13 13:22:14 +01:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (bp_addr + bp_size <= memaddr)
|
|
|
|
|
/* The breakpoint is entirely before the chunk of memory we
|
|
|
|
|
are reading. */
|
|
|
|
|
continue;
|
* breakpoint.h (breakpoint_restore_shadows): New
declaration.
* breakpoint.c (breakpoint_restore_shadows): New.
(read_memory_nobpt): Delete.
* gdbcore.h (read_memory_nobpt): Delete declaration.
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
(make_show_memory_beakpoints_cleanup): New.
(show_memory_breakpoints): New.
* target.h (make_show_memory_beakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
* alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
2008-03-13 13:22:14 +01:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (bp_addr >= memaddr + len)
|
|
|
|
|
/* The breakpoint is entirely after the chunk of memory we are
|
|
|
|
|
reading. */
|
|
|
|
|
continue;
|
|
|
|
|
|
* breakpoint.h (breakpoint_restore_shadows): New
declaration.
* breakpoint.c (breakpoint_restore_shadows): New.
(read_memory_nobpt): Delete.
* gdbcore.h (read_memory_nobpt): Delete declaration.
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
(make_show_memory_beakpoints_cleanup): New.
(show_memory_breakpoints): New.
* target.h (make_show_memory_beakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
* alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
2008-03-13 13:22:14 +01:00
|
|
|
|
/* Offset within shadow_contents. */
|
|
|
|
|
if (bp_addr < memaddr)
|
|
|
|
|
{
|
|
|
|
|
/* Only copy the second part of the breakpoint. */
|
|
|
|
|
bp_size -= memaddr - bp_addr;
|
|
|
|
|
bptoffset = memaddr - bp_addr;
|
|
|
|
|
bp_addr = memaddr;
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
* breakpoint.h (breakpoint_restore_shadows): New
declaration.
* breakpoint.c (breakpoint_restore_shadows): New.
(read_memory_nobpt): Delete.
* gdbcore.h (read_memory_nobpt): Delete declaration.
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
(make_show_memory_beakpoints_cleanup): New.
(show_memory_breakpoints): New.
* target.h (make_show_memory_beakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
* alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
2008-03-13 13:22:14 +01:00
|
|
|
|
if (bp_addr + bp_size > memaddr + len)
|
|
|
|
|
{
|
|
|
|
|
/* Only copy the first part of the breakpoint. */
|
|
|
|
|
bp_size -= (bp_addr + bp_size) - (memaddr + len);
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
* breakpoint.h (breakpoint_restore_shadows): New
declaration.
* breakpoint.c (breakpoint_restore_shadows): New.
(read_memory_nobpt): Delete.
* gdbcore.h (read_memory_nobpt): Delete declaration.
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
(make_show_memory_beakpoints_cleanup): New.
(show_memory_breakpoints): New.
* target.h (make_show_memory_beakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
* alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
2008-03-13 13:22:14 +01:00
|
|
|
|
memcpy (buf + bp_addr - memaddr,
|
|
|
|
|
b->target_info.shadow_contents + bptoffset, bp_size);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2003-06-17 21:17:59 +02:00
|
|
|
|
/* A wrapper function for inserting catchpoints. */
|
2005-01-14 23:59:36 +01:00
|
|
|
|
static void
|
2003-06-17 21:17:59 +02:00
|
|
|
|
insert_catchpoint (struct ui_out *uo, void *args)
|
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b = (struct breakpoint *) args;
|
|
|
|
|
int val = -1;
|
|
|
|
|
|
|
|
|
|
switch (b->type)
|
|
|
|
|
{
|
|
|
|
|
case bp_catch_fork:
|
2005-01-18 18:04:28 +01:00
|
|
|
|
target_insert_fork_catchpoint (PIDGET (inferior_ptid));
|
2003-06-17 21:17:59 +02:00
|
|
|
|
break;
|
|
|
|
|
case bp_catch_vfork:
|
2005-01-18 18:04:28 +01:00
|
|
|
|
target_insert_vfork_catchpoint (PIDGET (inferior_ptid));
|
2003-06-17 21:17:59 +02:00
|
|
|
|
break;
|
|
|
|
|
case bp_catch_exec:
|
2005-01-18 18:04:28 +01:00
|
|
|
|
target_insert_exec_catchpoint (PIDGET (inferior_ptid));
|
2003-06-17 21:17:59 +02:00
|
|
|
|
break;
|
|
|
|
|
default:
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
internal_error (__FILE__, __LINE__, _("unknown breakpoint type"));
|
2003-06-17 21:17:59 +02:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2008-01-29 18:52:47 +01:00
|
|
|
|
static int
|
|
|
|
|
is_hardware_watchpoint (struct breakpoint *bpt)
|
|
|
|
|
{
|
|
|
|
|
return (bpt->type == bp_hardware_watchpoint
|
|
|
|
|
|| bpt->type == bp_read_watchpoint
|
|
|
|
|
|| bpt->type == bp_access_watchpoint);
|
|
|
|
|
}
|
2004-04-26 11:02:41 +02:00
|
|
|
|
|
2008-03-03 14:24:12 +01:00
|
|
|
|
/* Find the current value of a watchpoint on EXP. Return the value in
|
|
|
|
|
*VALP and *RESULTP and the chain of intermediate and final values
|
|
|
|
|
in *VAL_CHAIN. RESULTP and VAL_CHAIN may be NULL if the caller does
|
|
|
|
|
not need them.
|
|
|
|
|
|
|
|
|
|
If an error occurs while evaluating the expression, *RESULTP will
|
|
|
|
|
be set to NULL. *RESULTP may be a lazy value, if the result could
|
|
|
|
|
not be read from memory. It is used to determine whether a value
|
|
|
|
|
is user-specified (we should watch the whole value) or intermediate
|
|
|
|
|
(we should watch only the bit used to locate the final value).
|
|
|
|
|
|
|
|
|
|
If the final value, or any intermediate value, could not be read
|
|
|
|
|
from memory, *VALP will be set to NULL. *VAL_CHAIN will still be
|
|
|
|
|
set to any referenced values. *VALP will never be a lazy value.
|
|
|
|
|
This is the value which we store in struct breakpoint.
|
|
|
|
|
|
|
|
|
|
If VAL_CHAIN is non-NULL, *VAL_CHAIN will be released from the
|
|
|
|
|
value chain. The caller must free the values individually. If
|
|
|
|
|
VAL_CHAIN is NULL, all generated values will be left on the value
|
|
|
|
|
chain. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
fetch_watchpoint_value (struct expression *exp, struct value **valp,
|
|
|
|
|
struct value **resultp, struct value **val_chain)
|
|
|
|
|
{
|
|
|
|
|
struct value *mark, *new_mark, *result;
|
|
|
|
|
|
|
|
|
|
*valp = NULL;
|
|
|
|
|
if (resultp)
|
|
|
|
|
*resultp = NULL;
|
|
|
|
|
if (val_chain)
|
|
|
|
|
*val_chain = NULL;
|
|
|
|
|
|
|
|
|
|
/* Evaluate the expression. */
|
|
|
|
|
mark = value_mark ();
|
|
|
|
|
result = NULL;
|
|
|
|
|
gdb_evaluate_expression (exp, &result);
|
|
|
|
|
new_mark = value_mark ();
|
|
|
|
|
if (mark == new_mark)
|
|
|
|
|
return;
|
|
|
|
|
if (resultp)
|
|
|
|
|
*resultp = result;
|
|
|
|
|
|
|
|
|
|
/* Make sure it's not lazy, so that after the target stops again we
|
|
|
|
|
have a non-lazy previous value to compare with. */
|
|
|
|
|
if (result != NULL
|
|
|
|
|
&& (!value_lazy (result) || gdb_value_fetch_lazy (result)))
|
|
|
|
|
*valp = result;
|
|
|
|
|
|
|
|
|
|
if (val_chain)
|
|
|
|
|
{
|
|
|
|
|
/* Return the chain of intermediate values. We use this to
|
|
|
|
|
decide which addresses to watch. */
|
|
|
|
|
*val_chain = new_mark;
|
|
|
|
|
value_release_to_mark (mark);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Assuming that B is a hardware watchpoint:
|
2008-01-29 18:52:47 +01:00
|
|
|
|
- Reparse watchpoint expression, is REPARSE is non-zero
|
|
|
|
|
- Evaluate expression and store the result in B->val
|
|
|
|
|
- Update the list of values that must be watched in B->loc.
|
|
|
|
|
|
|
|
|
|
If the watchpoint is disabled, do nothing. If this is
|
|
|
|
|
local watchpoint that is out of scope, delete it. */
|
2006-10-17 23:53:26 +02:00
|
|
|
|
static void
|
2008-01-29 18:52:47 +01:00
|
|
|
|
update_watchpoint (struct breakpoint *b, int reparse)
|
2004-04-26 11:02:41 +02:00
|
|
|
|
{
|
2008-01-29 18:52:47 +01:00
|
|
|
|
int within_current_scope;
|
|
|
|
|
struct frame_id saved_frame_id;
|
|
|
|
|
struct bp_location *loc;
|
|
|
|
|
bpstat bs;
|
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
/* We don't free locations. They are stored in
|
|
|
|
|
bp_location_chain and update_global_locations will
|
|
|
|
|
eventually delete them and remove breakpoints if
|
|
|
|
|
needed. */
|
2008-01-29 18:52:47 +01:00
|
|
|
|
b->loc = NULL;
|
|
|
|
|
|
|
|
|
|
if (b->disposition == disp_del_at_next_stop)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
/* Save the current frame's ID so we can restore it after
|
|
|
|
|
evaluating the watchpoint expression on its own frame. */
|
|
|
|
|
/* FIXME drow/2003-09-09: It would be nice if evaluate_expression
|
|
|
|
|
took a frame parameter, so that we didn't have to change the
|
|
|
|
|
selected frame. */
|
|
|
|
|
saved_frame_id = get_frame_id (get_selected_frame (NULL));
|
|
|
|
|
|
|
|
|
|
/* Determine if the watchpoint is within scope. */
|
|
|
|
|
if (b->exp_valid_block == NULL)
|
|
|
|
|
within_current_scope = 1;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
struct frame_info *fi;
|
|
|
|
|
fi = frame_find_by_id (b->watchpoint_frame);
|
|
|
|
|
within_current_scope = (fi != NULL);
|
|
|
|
|
if (within_current_scope)
|
|
|
|
|
select_frame (fi);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (within_current_scope && reparse)
|
|
|
|
|
{
|
|
|
|
|
char *s;
|
|
|
|
|
if (b->exp)
|
|
|
|
|
{
|
|
|
|
|
xfree (b->exp);
|
|
|
|
|
b->exp = NULL;
|
|
|
|
|
}
|
|
|
|
|
s = b->exp_string;
|
|
|
|
|
b->exp = parse_exp_1 (&s, b->exp_valid_block, 0);
|
|
|
|
|
/* If the meaning of expression itself changed, the old value is
|
|
|
|
|
no longer relevant. We don't want to report a watchpoint hit
|
|
|
|
|
to the user when the old value and the new value may actually
|
|
|
|
|
be completely different objects. */
|
|
|
|
|
value_free (b->val);
|
2008-03-03 14:24:12 +01:00
|
|
|
|
b->val = NULL;
|
|
|
|
|
b->val_valid = 0;
|
2008-01-29 18:52:47 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* If we failed to parse the expression, for example because
|
|
|
|
|
it refers to a global variable in a not-yet-loaded shared library,
|
|
|
|
|
don't try to insert watchpoint. We don't automatically delete
|
|
|
|
|
such watchpoint, though, since failure to parse expression
|
|
|
|
|
is different from out-of-scope watchpoint. */
|
|
|
|
|
if (within_current_scope && b->exp)
|
|
|
|
|
{
|
2008-03-03 14:24:12 +01:00
|
|
|
|
struct value *val_chain, *v, *result, *next;
|
2008-01-29 18:52:47 +01:00
|
|
|
|
|
2008-03-03 14:24:12 +01:00
|
|
|
|
fetch_watchpoint_value (b->exp, &v, &result, &val_chain);
|
2008-01-29 18:52:47 +01:00
|
|
|
|
|
|
|
|
|
/* Avoid setting b->val if it's already set. The meaning of
|
|
|
|
|
b->val is 'the last value' user saw, and we should update
|
|
|
|
|
it only if we reported that last value to user. As it
|
|
|
|
|
happens, the code that reports it updates b->val directly. */
|
2008-03-03 14:24:12 +01:00
|
|
|
|
if (!b->val_valid)
|
|
|
|
|
{
|
|
|
|
|
b->val = v;
|
|
|
|
|
b->val_valid = 1;
|
|
|
|
|
}
|
2008-01-29 18:52:47 +01:00
|
|
|
|
|
|
|
|
|
/* Look at each value on the value chain. */
|
2008-03-03 14:24:12 +01:00
|
|
|
|
for (v = val_chain; v; v = next)
|
2008-01-29 18:52:47 +01:00
|
|
|
|
{
|
|
|
|
|
/* If it's a memory location, and GDB actually needed
|
|
|
|
|
its contents to evaluate the expression, then we
|
2008-03-03 14:24:12 +01:00
|
|
|
|
must watch it. If the first value returned is
|
|
|
|
|
still lazy, that means an error occurred reading it;
|
|
|
|
|
watch it anyway in case it becomes readable. */
|
2008-01-29 18:52:47 +01:00
|
|
|
|
if (VALUE_LVAL (v) == lval_memory
|
2008-03-03 14:24:12 +01:00
|
|
|
|
&& (v == val_chain || ! value_lazy (v)))
|
2008-01-29 18:52:47 +01:00
|
|
|
|
{
|
|
|
|
|
struct type *vtype = check_typedef (value_type (v));
|
2004-04-26 11:02:41 +02:00
|
|
|
|
|
2008-01-29 18:52:47 +01:00
|
|
|
|
/* 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. */
|
2008-03-03 14:24:12 +01:00
|
|
|
|
if (v == result
|
2008-01-29 18:52:47 +01:00
|
|
|
|
|| (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
|
|
|
|
|
&& TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
|
|
|
|
|
{
|
|
|
|
|
CORE_ADDR addr;
|
|
|
|
|
int len, type;
|
|
|
|
|
struct bp_location *loc, **tmp;
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
loc = allocate_bp_location (b, bp_hardware_watchpoint);
|
|
|
|
|
for (tmp = &(b->loc); *tmp != NULL; tmp = &((*tmp)->next))
|
|
|
|
|
;
|
|
|
|
|
*tmp = loc;
|
|
|
|
|
loc->address = addr;
|
|
|
|
|
loc->length = len;
|
|
|
|
|
loc->watchpoint_type = type;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
next = value_next (v);
|
|
|
|
|
if (v != b->val)
|
|
|
|
|
value_free (v);
|
|
|
|
|
}
|
|
|
|
|
|
2008-04-18 02:41:28 +02:00
|
|
|
|
/* We just regenerated the list of breakpoint locations.
|
|
|
|
|
The new location does not have its condition field set to anything
|
|
|
|
|
and therefore, we must always reparse the cond_string, independently
|
|
|
|
|
of the value of the reparse flag. */
|
|
|
|
|
if (b->cond_string != NULL)
|
2008-01-29 18:52:47 +01:00
|
|
|
|
{
|
|
|
|
|
char *s = b->cond_string;
|
|
|
|
|
b->loc->cond = parse_exp_1 (&s, b->exp_valid_block, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (!within_current_scope)
|
2004-04-26 11:02:41 +02:00
|
|
|
|
{
|
2008-01-29 18:52:47 +01:00
|
|
|
|
printf_filtered (_("\
|
|
|
|
|
Hardware watchpoint %d deleted because the program has left the block \n\
|
|
|
|
|
in which its expression is valid.\n"),
|
|
|
|
|
b->number);
|
|
|
|
|
if (b->related_breakpoint)
|
|
|
|
|
b->related_breakpoint->disposition = disp_del_at_next_stop;
|
|
|
|
|
b->disposition = disp_del_at_next_stop;
|
2004-04-26 11:02:41 +02:00
|
|
|
|
}
|
2008-01-29 18:52:47 +01:00
|
|
|
|
|
|
|
|
|
/* Restore the selected frame. */
|
|
|
|
|
select_frame (frame_find_by_id (saved_frame_id));
|
2004-04-26 11:02:41 +02:00
|
|
|
|
}
|
|
|
|
|
|
2008-01-29 18:52:47 +01:00
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
/* Returns 1 iff breakpoint location should be
|
|
|
|
|
inserted in the inferior. */
|
|
|
|
|
static int
|
|
|
|
|
should_be_inserted (struct bp_location *bpt)
|
|
|
|
|
{
|
|
|
|
|
if (!breakpoint_enabled (bpt->owner))
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if (bpt->owner->disposition == disp_del_at_next_stop)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if (!bpt->enabled || bpt->shlib_disabled || bpt->duplicate)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2003-11-06 19:26:17 +01:00
|
|
|
|
/* Insert a low-level "breakpoint" of some type. BPT is the breakpoint.
|
|
|
|
|
Any error messages are printed to TMP_ERROR_STREAM; and DISABLED_BREAKS,
|
|
|
|
|
PROCESS_WARNING, and HW_BREAKPOINT_ERROR are used to report problems.
|
|
|
|
|
|
|
|
|
|
NOTE drow/2003-09-09: This routine could be broken down to an object-style
|
|
|
|
|
method for each breakpoint or catchpoint type. */
|
2003-11-06 19:35:05 +01:00
|
|
|
|
static int
|
2003-11-06 19:26:17 +01:00
|
|
|
|
insert_bp_location (struct bp_location *bpt,
|
2003-11-06 19:35:05 +01:00
|
|
|
|
struct ui_file *tmp_error_stream,
|
|
|
|
|
int *disabled_breaks, int *process_warning,
|
|
|
|
|
int *hw_breakpoint_error)
|
2003-11-06 19:26:17 +01:00
|
|
|
|
{
|
|
|
|
|
int val = 0;
|
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
if (!should_be_inserted (bpt) || bpt->inserted)
|
2003-11-06 19:26:17 +01:00
|
|
|
|
return 0;
|
|
|
|
|
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
/* Initialize the target-specific information. */
|
|
|
|
|
memset (&bpt->target_info, 0, sizeof (bpt->target_info));
|
|
|
|
|
bpt->target_info.placed_address = bpt->address;
|
|
|
|
|
|
2003-11-06 19:26:17 +01:00
|
|
|
|
if (bpt->loc_type == bp_loc_software_breakpoint
|
|
|
|
|
|| bpt->loc_type == bp_loc_hardware_breakpoint)
|
|
|
|
|
{
|
2006-11-22 11:43:34 +01:00
|
|
|
|
if (bpt->owner->type != bp_hardware_breakpoint)
|
|
|
|
|
{
|
|
|
|
|
/* If the explicitly specified breakpoint type
|
|
|
|
|
is not hardware breakpoint, check the memory map to see
|
|
|
|
|
if the breakpoint address is in read only memory or not.
|
|
|
|
|
Two important cases are:
|
|
|
|
|
- location type is not hardware breakpoint, memory
|
|
|
|
|
is readonly. We change the type of the location to
|
|
|
|
|
hardware breakpoint.
|
|
|
|
|
- location type is hardware breakpoint, memory is read-write.
|
|
|
|
|
This means we've previously made the location hardware one, but
|
|
|
|
|
then the memory map changed, so we undo.
|
|
|
|
|
|
|
|
|
|
When breakpoints are removed, remove_breakpoints will
|
|
|
|
|
use location types we've just set here, the only possible
|
|
|
|
|
problem is that memory map has changed during running program,
|
|
|
|
|
but it's not going to work anyway with current gdb. */
|
|
|
|
|
struct mem_region *mr
|
|
|
|
|
= lookup_mem_region (bpt->target_info.placed_address);
|
|
|
|
|
|
|
|
|
|
if (mr)
|
|
|
|
|
{
|
|
|
|
|
if (automatic_hardware_breakpoints)
|
|
|
|
|
{
|
|
|
|
|
int changed = 0;
|
|
|
|
|
enum bp_loc_type new_type;
|
|
|
|
|
|
|
|
|
|
if (mr->attrib.mode != MEM_RW)
|
|
|
|
|
new_type = bp_loc_hardware_breakpoint;
|
|
|
|
|
else
|
|
|
|
|
new_type = bp_loc_software_breakpoint;
|
|
|
|
|
|
|
|
|
|
if (new_type != bpt->loc_type)
|
|
|
|
|
{
|
|
|
|
|
static int said = 0;
|
|
|
|
|
bpt->loc_type = new_type;
|
|
|
|
|
if (!said)
|
|
|
|
|
{
|
|
|
|
|
fprintf_filtered (gdb_stdout, _("\
|
2006-12-15 16:22:22 +01:00
|
|
|
|
Note: automatically using hardware breakpoints for read-only addresses.\n"));
|
2006-11-22 11:43:34 +01:00
|
|
|
|
said = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (bpt->loc_type == bp_loc_software_breakpoint
|
|
|
|
|
&& mr->attrib.mode != MEM_RW)
|
|
|
|
|
warning (_("cannot set software breakpoint at readonly address %s"),
|
|
|
|
|
paddr (bpt->address));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2003-11-06 19:26:17 +01:00
|
|
|
|
/* First check to see if we have to handle an overlay. */
|
|
|
|
|
if (overlay_debugging == ovly_off
|
|
|
|
|
|| bpt->section == NULL
|
|
|
|
|
|| !(section_is_overlay (bpt->section)))
|
|
|
|
|
{
|
|
|
|
|
/* No overlay handling: just set the breakpoint. */
|
|
|
|
|
|
|
|
|
|
if (bpt->loc_type == bp_loc_hardware_breakpoint)
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
val = target_insert_hw_breakpoint (&bpt->target_info);
|
2003-11-06 19:26:17 +01:00
|
|
|
|
else
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
val = target_insert_breakpoint (&bpt->target_info);
|
2003-11-06 19:26:17 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* This breakpoint is in an overlay section.
|
|
|
|
|
Shall we set a breakpoint at the LMA? */
|
|
|
|
|
if (!overlay_events_enabled)
|
|
|
|
|
{
|
|
|
|
|
/* Yes -- overlay event support is not active,
|
|
|
|
|
so we must try to set a breakpoint at the LMA.
|
|
|
|
|
This will not work for a hardware breakpoint. */
|
|
|
|
|
if (bpt->loc_type == bp_loc_hardware_breakpoint)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("hardware breakpoint %d not supported in overlay!"),
|
2003-11-06 19:26:17 +01:00
|
|
|
|
bpt->owner->number);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
CORE_ADDR addr = overlay_unmapped_address (bpt->address,
|
|
|
|
|
bpt->section);
|
|
|
|
|
/* Set a software (trap) breakpoint at the LMA. */
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
bpt->overlay_target_info = bpt->target_info;
|
|
|
|
|
bpt->overlay_target_info.placed_address = addr;
|
|
|
|
|
val = target_insert_breakpoint (&bpt->overlay_target_info);
|
2003-11-06 19:26:17 +01:00
|
|
|
|
if (val != 0)
|
|
|
|
|
fprintf_unfiltered (tmp_error_stream,
|
|
|
|
|
"Overlay breakpoint %d failed: in ROM?",
|
|
|
|
|
bpt->owner->number);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* Shall we set a breakpoint at the VMA? */
|
|
|
|
|
if (section_is_mapped (bpt->section))
|
|
|
|
|
{
|
|
|
|
|
/* Yes. This overlay section is mapped into memory. */
|
|
|
|
|
if (bpt->loc_type == bp_loc_hardware_breakpoint)
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
val = target_insert_hw_breakpoint (&bpt->target_info);
|
2003-11-06 19:26:17 +01:00
|
|
|
|
else
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
val = target_insert_breakpoint (&bpt->target_info);
|
2003-11-06 19:26:17 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* No. This breakpoint will not be inserted.
|
|
|
|
|
No error, but do not mark the bp as 'inserted'. */
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (val)
|
|
|
|
|
{
|
|
|
|
|
/* Can't set the breakpoint. */
|
2007-07-02 20:30:19 +02:00
|
|
|
|
if (solib_address (bpt->address))
|
2003-11-06 19:26:17 +01:00
|
|
|
|
{
|
|
|
|
|
/* See also: disable_breakpoints_in_shlibs. */
|
|
|
|
|
val = 0;
|
2007-09-23 09:56:22 +02:00
|
|
|
|
bpt->shlib_disabled = 1;
|
2003-11-06 19:26:17 +01:00
|
|
|
|
if (!*disabled_breaks)
|
|
|
|
|
{
|
|
|
|
|
fprintf_unfiltered (tmp_error_stream,
|
|
|
|
|
"Cannot insert breakpoint %d.\n",
|
|
|
|
|
bpt->owner->number);
|
|
|
|
|
fprintf_unfiltered (tmp_error_stream,
|
|
|
|
|
"Temporarily disabling shared library breakpoints:\n");
|
|
|
|
|
}
|
|
|
|
|
*disabled_breaks = 1;
|
|
|
|
|
fprintf_unfiltered (tmp_error_stream,
|
|
|
|
|
"breakpoint #%d\n", bpt->owner->number);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
#ifdef ONE_PROCESS_WRITETEXT
|
|
|
|
|
*process_warning = 1;
|
|
|
|
|
#endif
|
|
|
|
|
if (bpt->loc_type == bp_loc_hardware_breakpoint)
|
|
|
|
|
{
|
|
|
|
|
*hw_breakpoint_error = 1;
|
|
|
|
|
fprintf_unfiltered (tmp_error_stream,
|
|
|
|
|
"Cannot insert hardware breakpoint %d.\n",
|
|
|
|
|
bpt->owner->number);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
fprintf_unfiltered (tmp_error_stream,
|
|
|
|
|
"Cannot insert breakpoint %d.\n",
|
|
|
|
|
bpt->owner->number);
|
|
|
|
|
fprintf_filtered (tmp_error_stream,
|
|
|
|
|
"Error accessing memory address ");
|
* exec.c: #include "arch-utils.h"
(print_section_info): Use gdbarch_from_bfd to get at the
current architecture. Replace current_gdbarch. Fix indention.
Replace deprecated_print_address_numeric by paddress.
* Makefile.in (exec.o) Add dependency to arch-utils.h.
* valprint.c (val_print_string): Replace
deprecated_print_address_numeric.
* tracepoint.c (trace_mention, scope_info): Likewise.
* symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1, print_symbol)
(print_symbol, print_partial_symbols, maintenance_info_psymtabs)
(maintenance_check_symtabs): Likewise.
* symfile.c (list_overlays_command): Likewise.
* stack.c (frame_info, print_block_frame_labels): Likewise.
* printcmd.c (print_address, print_address_demangle)
(address_info): Likewise.
* corefile.c (memory_error): Likewise.
* infcmd.c (jump_command): Likewise.
* breakpoint.c (insert_bp_location, describe_other_breakpoints)
(mention, delete_breakpoint): Likewise.
* c-valprint.c (print_function_pointer_address, c_val_print): Likewise.
* dwarf2read.c (dump_die): Likewise.
* ada-valprint.c (ada_val_print_1): Likewise.
* f-valprint.c (f_val_print): Likewise.
* linux-fork.c (info_forks_command): Likewise.
* m32r-com.c (m32r_load_section, m32r_load)
(m32r_upload_command): Likewise.
* ui-out.c (ui_out_field_core_addr): Remove unnecessary comment.
2008-01-11 14:34:15 +01:00
|
|
|
|
fputs_filtered (paddress (bpt->address), tmp_error_stream);
|
2003-11-06 19:26:17 +01:00
|
|
|
|
fprintf_filtered (tmp_error_stream, ": %s.\n",
|
|
|
|
|
safe_strerror (val));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
bpt->inserted = 1;
|
|
|
|
|
|
|
|
|
|
return val;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (bpt->loc_type == bp_loc_hardware_watchpoint
|
|
|
|
|
/* NOTE drow/2003-09-08: This state only exists for removing
|
|
|
|
|
watchpoints. It's not clear that it's necessary... */
|
|
|
|
|
&& bpt->owner->disposition != disp_del_at_next_stop)
|
|
|
|
|
{
|
2008-01-29 18:52:47 +01:00
|
|
|
|
val = target_insert_watchpoint (bpt->address,
|
|
|
|
|
bpt->length,
|
|
|
|
|
bpt->watchpoint_type);
|
|
|
|
|
bpt->inserted = (val != -1);
|
2003-11-06 19:26:17 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (bpt->owner->type == bp_catch_fork
|
|
|
|
|
|| bpt->owner->type == bp_catch_vfork
|
|
|
|
|
|| bpt->owner->type == bp_catch_exec)
|
|
|
|
|
{
|
2005-04-26 07:03:41 +02:00
|
|
|
|
struct gdb_exception e = catch_exception (uiout, insert_catchpoint,
|
|
|
|
|
bpt->owner, RETURN_MASK_ERROR);
|
2005-01-14 23:59:36 +01:00
|
|
|
|
exception_fprintf (gdb_stderr, e, "warning: inserting catchpoint %d: ",
|
|
|
|
|
bpt->owner->number);
|
|
|
|
|
if (e.reason < 0)
|
2003-11-06 19:26:17 +01:00
|
|
|
|
bpt->owner->enable_state = bp_disabled;
|
|
|
|
|
else
|
|
|
|
|
bpt->inserted = 1;
|
2003-11-12 18:00:42 +01:00
|
|
|
|
|
|
|
|
|
/* We've already printed an error message if there was a problem
|
|
|
|
|
inserting this catchpoint, and we've disabled the catchpoint,
|
|
|
|
|
so just return success. */
|
|
|
|
|
return 0;
|
2003-11-06 19:26:17 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
/* Make sure all breakpoints are inserted in inferior.
|
|
|
|
|
Throws exception on any error.
|
|
|
|
|
A breakpoint that is already inserted won't be inserted
|
|
|
|
|
again, so calling this function twice is safe. */
|
|
|
|
|
void
|
|
|
|
|
insert_breakpoints (void)
|
|
|
|
|
{
|
|
|
|
|
struct breakpoint *bpt;
|
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (bpt)
|
|
|
|
|
if (is_hardware_watchpoint (bpt))
|
|
|
|
|
update_watchpoint (bpt, 0 /* don't reparse. */);
|
|
|
|
|
|
|
|
|
|
update_global_location_list ();
|
|
|
|
|
|
|
|
|
|
if (!always_inserted_mode && target_has_execution)
|
|
|
|
|
/* update_global_location_list does not insert breakpoints
|
|
|
|
|
when always_inserted_mode is not enabled. Explicitly
|
|
|
|
|
insert them now. */
|
|
|
|
|
insert_breakpoint_locations ();
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* insert_breakpoints is used when starting or continuing the program.
|
|
|
|
|
remove_breakpoints is used when the program stops.
|
|
|
|
|
Both return zero if successful,
|
|
|
|
|
or an `errno' value if could not write the inferior. */
|
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
static void
|
|
|
|
|
insert_breakpoint_locations (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2008-01-29 18:52:47 +01:00
|
|
|
|
struct breakpoint *bpt;
|
2003-11-06 19:26:17 +01:00
|
|
|
|
struct bp_location *b, *temp;
|
2007-11-30 11:00:26 +01:00
|
|
|
|
int error = 0;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
int val = 0;
|
|
|
|
|
int disabled_breaks = 0;
|
2002-08-23 22:49:38 +02:00
|
|
|
|
int hw_breakpoint_error = 0;
|
|
|
|
|
int process_warning = 0;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2002-08-23 22:49:38 +02:00
|
|
|
|
struct ui_file *tmp_error_stream = mem_fileopen ();
|
|
|
|
|
make_cleanup_ui_file_delete (tmp_error_stream);
|
2008-04-24 12:21:45 +02:00
|
|
|
|
|
2002-08-23 22:49:38 +02:00
|
|
|
|
/* Explicitly mark the warning -- this will only be printed if
|
|
|
|
|
there was an error. */
|
|
|
|
|
fprintf_unfiltered (tmp_error_stream, "Warning:\n");
|
2008-01-29 18:52:47 +01:00
|
|
|
|
|
2003-11-06 19:26:17 +01:00
|
|
|
|
ALL_BP_LOCATIONS_SAFE (b, temp)
|
|
|
|
|
{
|
2008-04-24 12:21:45 +02:00
|
|
|
|
if (!should_be_inserted (b) || b->inserted)
|
2003-11-06 19:26:17 +01:00
|
|
|
|
continue;
|
|
|
|
|
|
2006-01-16 13:55:18 +01:00
|
|
|
|
/* There is no point inserting thread-specific breakpoints if the
|
|
|
|
|
thread no longer exists. */
|
|
|
|
|
if (b->owner->thread != -1
|
|
|
|
|
&& !valid_thread_id (b->owner->thread))
|
|
|
|
|
continue;
|
|
|
|
|
|
2003-11-06 19:26:17 +01:00
|
|
|
|
val = insert_bp_location (b, tmp_error_stream,
|
|
|
|
|
&disabled_breaks, &process_warning,
|
|
|
|
|
&hw_breakpoint_error);
|
|
|
|
|
if (val)
|
2007-11-30 11:00:26 +01:00
|
|
|
|
error = val;
|
2003-11-06 19:26:17 +01:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2008-01-29 18:52:47 +01:00
|
|
|
|
/* If we failed to insert all locations of a watchpoint,
|
|
|
|
|
remove them, as half-inserted watchpoint is of limited use. */
|
|
|
|
|
ALL_BREAKPOINTS (bpt)
|
|
|
|
|
{
|
|
|
|
|
int some_failed = 0;
|
|
|
|
|
struct bp_location *loc;
|
|
|
|
|
|
|
|
|
|
if (!is_hardware_watchpoint (bpt))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (bpt->enable_state != bp_enabled)
|
|
|
|
|
continue;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
|
|
|
|
|
if (bpt->disposition == disp_del_at_next_stop)
|
|
|
|
|
continue;
|
2008-01-29 18:52:47 +01:00
|
|
|
|
|
|
|
|
|
for (loc = bpt->loc; loc; loc = loc->next)
|
|
|
|
|
if (!loc->inserted)
|
|
|
|
|
{
|
|
|
|
|
some_failed = 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (some_failed)
|
|
|
|
|
{
|
|
|
|
|
for (loc = bpt->loc; loc; loc = loc->next)
|
|
|
|
|
if (loc->inserted)
|
|
|
|
|
remove_breakpoint (loc, mark_uninserted);
|
|
|
|
|
|
|
|
|
|
hw_breakpoint_error = 1;
|
|
|
|
|
fprintf_unfiltered (tmp_error_stream,
|
|
|
|
|
"Could not insert hardware watchpoint %d.\n",
|
|
|
|
|
bpt->number);
|
|
|
|
|
error = -1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2007-11-30 11:00:26 +01:00
|
|
|
|
if (error)
|
2002-08-23 22:49:38 +02:00
|
|
|
|
{
|
|
|
|
|
/* If a hardware breakpoint or watchpoint was inserted, add a
|
|
|
|
|
message about possibly exhausted resources. */
|
2003-11-06 19:26:17 +01:00
|
|
|
|
if (hw_breakpoint_error)
|
2002-08-23 22:49:38 +02:00
|
|
|
|
{
|
2002-09-05 03:28:14 +02:00
|
|
|
|
fprintf_unfiltered (tmp_error_stream,
|
|
|
|
|
"Could not insert hardware breakpoints:\n\
|
|
|
|
|
You may have requested too many hardware breakpoints/watchpoints.\n");
|
2002-08-23 22:49:38 +02:00
|
|
|
|
}
|
2002-09-05 03:28:14 +02:00
|
|
|
|
#ifdef ONE_PROCESS_WRITETEXT
|
2002-08-23 22:49:38 +02:00
|
|
|
|
if (process_warning)
|
2002-09-05 03:28:14 +02:00
|
|
|
|
fprintf_unfiltered (tmp_error_stream,
|
|
|
|
|
"The same program may be running in another process.");
|
|
|
|
|
#endif
|
2002-08-23 22:49:38 +02:00
|
|
|
|
target_terminal_ours_for_output ();
|
|
|
|
|
error_stream (tmp_error_stream);
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
remove_breakpoints (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-11-06 19:28:33 +01:00
|
|
|
|
struct bp_location *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
int val;
|
|
|
|
|
|
2003-11-06 19:28:33 +01:00
|
|
|
|
ALL_BP_LOCATIONS (b)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2003-11-06 19:28:33 +01:00
|
|
|
|
if (b->inserted)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
val = remove_breakpoint (b, mark_uninserted);
|
|
|
|
|
if (val != 0)
|
|
|
|
|
return val;
|
|
|
|
|
}
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2000-03-29 00:30:19 +02:00
|
|
|
|
int
|
2000-03-29 02:51:17 +02:00
|
|
|
|
remove_hw_watchpoints (void)
|
2000-03-29 00:30:19 +02:00
|
|
|
|
{
|
2003-11-06 19:28:33 +01:00
|
|
|
|
struct bp_location *b;
|
2000-03-29 00:30:19 +02:00
|
|
|
|
int val;
|
|
|
|
|
|
2003-11-06 19:28:33 +01:00
|
|
|
|
ALL_BP_LOCATIONS (b)
|
2000-03-29 00:30:19 +02:00
|
|
|
|
{
|
2003-11-06 19:28:33 +01:00
|
|
|
|
if (b->inserted && b->loc_type == bp_loc_hardware_watchpoint)
|
2000-03-29 00:30:19 +02:00
|
|
|
|
{
|
|
|
|
|
val = remove_breakpoint (b, mark_uninserted);
|
|
|
|
|
if (val != 0)
|
|
|
|
|
return val;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
reattach_breakpoints (int pid)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-11-06 19:28:33 +01:00
|
|
|
|
struct bp_location *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
int val;
|
2001-05-07 00:22:03 +02:00
|
|
|
|
struct cleanup *old_chain = save_inferior_ptid ();
|
2007-07-02 18:14:01 +02:00
|
|
|
|
struct ui_file *tmp_error_stream = mem_fileopen ();
|
|
|
|
|
int dummy1 = 0, dummy2 = 0, dummy3 = 0;
|
|
|
|
|
|
|
|
|
|
make_cleanup_ui_file_delete (tmp_error_stream);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2001-05-07 00:22:03 +02:00
|
|
|
|
inferior_ptid = pid_to_ptid (pid);
|
2003-11-06 19:28:33 +01:00
|
|
|
|
ALL_BP_LOCATIONS (b)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2003-11-06 19:28:33 +01:00
|
|
|
|
if (b->inserted)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2007-07-02 18:14:01 +02:00
|
|
|
|
b->inserted = 0;
|
|
|
|
|
val = insert_bp_location (b, tmp_error_stream,
|
|
|
|
|
&dummy1, &dummy2, &dummy3);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (val != 0)
|
|
|
|
|
{
|
2001-05-07 00:22:03 +02:00
|
|
|
|
do_cleanups (old_chain);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
return val;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2001-05-07 00:22:03 +02:00
|
|
|
|
do_cleanups (old_chain);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
static void
|
|
|
|
|
restore_always_inserted_mode (void *p)
|
|
|
|
|
{
|
|
|
|
|
always_inserted_mode = (uintptr_t) p;
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
update_breakpoints_after_exec (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
struct breakpoint *temp;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
struct cleanup *cleanup;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Doing this first prevents the badness of having delete_breakpoint()
|
|
|
|
|
write a breakpoint's current "shadow contents" to lift the bp. That
|
|
|
|
|
shadow is NOT valid after an exec()! */
|
|
|
|
|
mark_breakpoints_out ();
|
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
/* The binary we used to debug is now gone, and we're updating
|
|
|
|
|
breakpoints for the new binary. Until we're done, we should not
|
|
|
|
|
try to insert breakpoints. */
|
|
|
|
|
cleanup = make_cleanup (restore_always_inserted_mode,
|
|
|
|
|
(void *) (uintptr_t) always_inserted_mode);
|
|
|
|
|
always_inserted_mode = 0;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
ALL_BREAKPOINTS_SAFE (b, temp)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
/* Solib breakpoints must be explicitly reset after an exec(). */
|
|
|
|
|
if (b->type == bp_shlib_event)
|
|
|
|
|
{
|
|
|
|
|
delete_breakpoint (b);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2002-02-06 19:31:07 +01:00
|
|
|
|
/* Thread event breakpoints must be set anew after an exec(),
|
|
|
|
|
as must overlay event breakpoints. */
|
|
|
|
|
if (b->type == bp_thread_event || b->type == bp_overlay_event)
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
|
|
|
|
delete_breakpoint (b);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* Step-resume breakpoints are meaningless after an exec(). */
|
|
|
|
|
if (b->type == bp_step_resume)
|
|
|
|
|
{
|
|
|
|
|
delete_breakpoint (b);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Don't delete an exec catchpoint, because else the inferior
|
|
|
|
|
won't stop when it ought!
|
|
|
|
|
|
|
|
|
|
Similarly, we probably ought to keep vfork catchpoints, 'cause
|
1999-08-24 00:40:00 +02:00
|
|
|
|
on this target, we may not be able to stop when the vfork is
|
|
|
|
|
seen, but only when the subsequent exec is seen. (And because
|
|
|
|
|
deleting fork catchpoints here but not vfork catchpoints will
|
2007-08-14 10:11:45 +02:00
|
|
|
|
seem mysterious to users, keep those too.) */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if ((b->type == bp_catch_exec) ||
|
|
|
|
|
(b->type == bp_catch_vfork) ||
|
|
|
|
|
(b->type == bp_catch_fork))
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* bp_finish is a special case. The only way we ought to be able
|
|
|
|
|
to see one of these when an exec() has happened, is if the user
|
|
|
|
|
caught a vfork, and then said "finish". Ordinarily a finish just
|
|
|
|
|
carries them to the call-site of the current callee, by setting
|
|
|
|
|
a temporary bp there and resuming. But in this case, the finish
|
|
|
|
|
will carry them entirely through the vfork & exec.
|
|
|
|
|
|
|
|
|
|
We don't want to allow a bp_finish to remain inserted now. But
|
|
|
|
|
we can't safely delete it, 'cause finish_command has a handle to
|
|
|
|
|
the bp on a bpstat, and will later want to delete it. There's a
|
|
|
|
|
chance (and I've seen it happen) that if we delete the bp_finish
|
|
|
|
|
here, that its storage will get reused by the time finish_command
|
|
|
|
|
gets 'round to deleting the "use to be a bp_finish" breakpoint.
|
|
|
|
|
We really must allow finish_command to delete a bp_finish.
|
|
|
|
|
|
1999-08-24 00:40:00 +02:00
|
|
|
|
In the absense of a general solution for the "how do we know
|
|
|
|
|
it's safe to delete something others may have handles to?"
|
|
|
|
|
problem, what we'll do here is just uninsert the bp_finish, and
|
|
|
|
|
let finish_command delete it.
|
|
|
|
|
|
|
|
|
|
(We know the bp_finish is "doomed" in the sense that it's
|
|
|
|
|
momentary, and will be deleted as soon as finish_command sees
|
|
|
|
|
the inferior stopped. So it doesn't matter that the bp's
|
|
|
|
|
address is probably bogus in the new a.out, unlike e.g., the
|
|
|
|
|
solib breakpoints.) */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
|
|
|
|
if (b->type == bp_finish)
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Without a symbolic address, we have little hope of the
|
|
|
|
|
pre-exec() address meaning the same thing in the post-exec()
|
|
|
|
|
a.out. */
|
|
|
|
|
if (b->addr_string == NULL)
|
|
|
|
|
{
|
|
|
|
|
delete_breakpoint (b);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
2002-02-06 19:31:07 +01:00
|
|
|
|
/* FIXME what about longjmp breakpoints? Re-create them here? */
|
|
|
|
|
create_overlay_event_breakpoint ("_ovly_debug_event");
|
2008-04-24 12:21:45 +02:00
|
|
|
|
do_cleanups (cleanup);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
detach_breakpoints (int pid)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-11-06 19:28:33 +01:00
|
|
|
|
struct bp_location *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
int val;
|
2001-05-07 00:22:03 +02:00
|
|
|
|
struct cleanup *old_chain = save_inferior_ptid ();
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2001-05-04 06:15:33 +02:00
|
|
|
|
if (pid == PIDGET (inferior_ptid))
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Cannot detach breakpoints of inferior_ptid"));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2001-05-07 00:22:03 +02:00
|
|
|
|
/* Set inferior_ptid; remove_breakpoint uses this global. */
|
|
|
|
|
inferior_ptid = pid_to_ptid (pid);
|
2003-11-06 19:28:33 +01:00
|
|
|
|
ALL_BP_LOCATIONS (b)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2003-11-06 19:28:33 +01:00
|
|
|
|
if (b->inserted)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
val = remove_breakpoint (b, mark_inserted);
|
|
|
|
|
if (val != 0)
|
|
|
|
|
{
|
2001-05-07 00:22:03 +02:00
|
|
|
|
do_cleanups (old_chain);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
return val;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2001-05-07 00:22:03 +02:00
|
|
|
|
do_cleanups (old_chain);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
2003-11-06 19:28:33 +01:00
|
|
|
|
remove_breakpoint (struct bp_location *b, insertion_state_t is)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
int val;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2003-11-06 19:28:33 +01:00
|
|
|
|
if (b->owner->enable_state == bp_permanent)
|
1999-09-22 05:28:34 +02:00
|
|
|
|
/* Permanent breakpoints cannot be inserted or removed. */
|
|
|
|
|
return 0;
|
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
/* The type of none suggests that owner is actually deleted.
|
|
|
|
|
This should not ever happen. */
|
|
|
|
|
gdb_assert (b->owner->type != bp_none);
|
2003-11-06 19:28:33 +01:00
|
|
|
|
|
|
|
|
|
if (b->loc_type == bp_loc_software_breakpoint
|
|
|
|
|
|| b->loc_type == bp_loc_hardware_breakpoint)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2002-04-05 04:35:26 +02:00
|
|
|
|
/* "Normal" instruction breakpoint: either the standard
|
|
|
|
|
trap-instruction bp (bp_breakpoint), or a
|
|
|
|
|
bp_hardware_breakpoint. */
|
|
|
|
|
|
|
|
|
|
/* First check to see if we have to handle an overlay. */
|
|
|
|
|
if (overlay_debugging == ovly_off
|
2003-11-06 19:28:33 +01:00
|
|
|
|
|| b->section == NULL
|
|
|
|
|
|| !(section_is_overlay (b->section)))
|
2002-04-05 04:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
/* No overlay handling: just remove the breakpoint. */
|
|
|
|
|
|
2003-11-06 19:28:33 +01:00
|
|
|
|
if (b->loc_type == bp_loc_hardware_breakpoint)
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
val = target_remove_hw_breakpoint (&b->target_info);
|
2002-04-05 04:35:26 +02:00
|
|
|
|
else
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
val = target_remove_breakpoint (&b->target_info);
|
2002-04-05 04:35:26 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else
|
|
|
|
|
{
|
2002-04-05 04:35:26 +02:00
|
|
|
|
/* This breakpoint is in an overlay section.
|
|
|
|
|
Did we set a breakpoint at the LMA? */
|
|
|
|
|
if (!overlay_events_enabled)
|
|
|
|
|
{
|
|
|
|
|
/* Yes -- overlay event support is not active, so we
|
|
|
|
|
should have set a breakpoint at the LMA. Remove it.
|
|
|
|
|
*/
|
|
|
|
|
/* Ignore any failures: if the LMA is in ROM, we will
|
|
|
|
|
have already warned when we failed to insert it. */
|
2003-11-06 19:28:33 +01:00
|
|
|
|
if (b->loc_type == bp_loc_hardware_breakpoint)
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
target_remove_hw_breakpoint (&b->overlay_target_info);
|
2002-04-05 04:35:26 +02:00
|
|
|
|
else
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
target_remove_breakpoint (&b->overlay_target_info);
|
2002-04-05 04:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
/* Did we set a breakpoint at the VMA?
|
|
|
|
|
If so, we will have marked the breakpoint 'inserted'. */
|
2003-11-06 19:28:33 +01:00
|
|
|
|
if (b->inserted)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2002-04-05 04:35:26 +02:00
|
|
|
|
/* Yes -- remove it. Previously we did not bother to
|
|
|
|
|
remove the breakpoint if the section had been
|
|
|
|
|
unmapped, but let's not rely on that being safe. We
|
|
|
|
|
don't know what the overlay manager might do. */
|
2003-11-06 19:28:33 +01:00
|
|
|
|
if (b->loc_type == bp_loc_hardware_breakpoint)
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
val = target_remove_hw_breakpoint (&b->target_info);
|
2007-05-11 22:01:31 +02:00
|
|
|
|
|
|
|
|
|
/* However, we should remove *software* breakpoints only
|
|
|
|
|
if the section is still mapped, or else we overwrite
|
|
|
|
|
wrong code with the saved shadow contents. */
|
|
|
|
|
else if (section_is_mapped (b->section))
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
val = target_remove_breakpoint (&b->target_info);
|
2007-05-11 22:01:31 +02:00
|
|
|
|
else
|
|
|
|
|
val = 0;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2002-04-05 04:35:26 +02:00
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* No -- not inserted, so no need to remove. No error. */
|
|
|
|
|
val = 0;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
if (val)
|
|
|
|
|
return val;
|
2003-11-06 19:28:33 +01:00
|
|
|
|
b->inserted = (is == mark_inserted);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2008-01-29 18:52:47 +01:00
|
|
|
|
else if (b->loc_type == bp_loc_hardware_watchpoint)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2001-10-21 01:54:29 +02:00
|
|
|
|
struct value *v;
|
|
|
|
|
struct value *n;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2003-11-06 19:28:33 +01:00
|
|
|
|
b->inserted = (is == mark_inserted);
|
2008-01-29 18:52:47 +01:00
|
|
|
|
val = target_remove_watchpoint (b->address, b->length,
|
|
|
|
|
b->watchpoint_type);
|
2000-03-21 02:27:34 +01:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Failure to remove any of the hardware watchpoints comes here. */
|
2003-11-06 19:28:33 +01:00
|
|
|
|
if ((is == mark_uninserted) && (b->inserted))
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("Could not remove hardware watchpoint %d."),
|
2003-11-06 19:28:33 +01:00
|
|
|
|
b->owner->number);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2003-11-06 19:28:33 +01:00
|
|
|
|
else if ((b->owner->type == bp_catch_fork ||
|
|
|
|
|
b->owner->type == bp_catch_vfork ||
|
|
|
|
|
b->owner->type == bp_catch_exec)
|
2003-12-12 20:04:46 +01:00
|
|
|
|
&& breakpoint_enabled (b->owner)
|
2003-11-06 19:28:33 +01:00
|
|
|
|
&& !b->duplicate)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
val = -1;
|
2003-11-06 19:28:33 +01:00
|
|
|
|
switch (b->owner->type)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
case bp_catch_fork:
|
2001-05-04 06:15:33 +02:00
|
|
|
|
val = target_remove_fork_catchpoint (PIDGET (inferior_ptid));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
break;
|
|
|
|
|
case bp_catch_vfork:
|
2001-05-04 06:15:33 +02:00
|
|
|
|
val = target_remove_vfork_catchpoint (PIDGET (inferior_ptid));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
break;
|
|
|
|
|
case bp_catch_exec:
|
2001-05-04 06:15:33 +02:00
|
|
|
|
val = target_remove_exec_catchpoint (PIDGET (inferior_ptid));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
break;
|
1999-06-01 17:44:41 +02:00
|
|
|
|
default:
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("Internal error, %s line %d."), __FILE__, __LINE__);
|
1999-06-01 17:44:41 +02:00
|
|
|
|
break;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (val)
|
|
|
|
|
return val;
|
2003-11-06 19:28:33 +01:00
|
|
|
|
b->inserted = (is == mark_inserted);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Clear the "inserted" flag in all breakpoints. */
|
|
|
|
|
|
2007-11-15 07:46:21 +01:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
mark_breakpoints_out (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-11-06 19:27:34 +01:00
|
|
|
|
struct bp_location *bpt;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-11-06 19:27:34 +01:00
|
|
|
|
ALL_BP_LOCATIONS (bpt)
|
|
|
|
|
bpt->inserted = 0;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
1999-08-24 00:40:00 +02:00
|
|
|
|
/* Clear the "inserted" flag in all breakpoints and delete any
|
|
|
|
|
breakpoints which should go away between runs of the program.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
Plus other such housekeeping that has to be done for breakpoints
|
|
|
|
|
between runs.
|
|
|
|
|
|
1999-08-24 00:40:00 +02:00
|
|
|
|
Note: this function gets called at the end of a run (by
|
|
|
|
|
generic_mourn_inferior) and when a run begins (by
|
|
|
|
|
init_wait_for_inferior). */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
breakpoint_init_inferior (enum inf_context context)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b, *temp;
|
2003-11-06 19:27:34 +01:00
|
|
|
|
struct bp_location *bpt;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-11-06 19:27:34 +01:00
|
|
|
|
ALL_BP_LOCATIONS (bpt)
|
|
|
|
|
bpt->inserted = 0;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
ALL_BREAKPOINTS_SAFE (b, temp)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
switch (b->type)
|
|
|
|
|
{
|
|
|
|
|
case bp_call_dummy:
|
|
|
|
|
case bp_watchpoint_scope:
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* If the call dummy breakpoint is at the entry point it will
|
|
|
|
|
cause problems when the inferior is rerun, so we better
|
|
|
|
|
get rid of it.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
Also get rid of scope breakpoints. */
|
|
|
|
|
delete_breakpoint (b);
|
|
|
|
|
break;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
case bp_watchpoint:
|
|
|
|
|
case bp_hardware_watchpoint:
|
|
|
|
|
case bp_read_watchpoint:
|
|
|
|
|
case bp_access_watchpoint:
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* Likewise for watchpoints on local expressions. */
|
|
|
|
|
if (b->exp_valid_block != NULL)
|
|
|
|
|
delete_breakpoint (b);
|
2007-08-01 01:08:22 +02:00
|
|
|
|
else if (context == inf_starting)
|
2002-08-30 09:14:19 +02:00
|
|
|
|
{
|
|
|
|
|
/* Reset val field to force reread of starting value
|
|
|
|
|
in insert_breakpoints. */
|
|
|
|
|
if (b->val)
|
|
|
|
|
value_free (b->val);
|
|
|
|
|
b->val = NULL;
|
2008-03-03 14:24:12 +01:00
|
|
|
|
b->val_valid = 0;
|
2002-08-30 09:14:19 +02:00
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
1999-09-22 05:28:34 +02:00
|
|
|
|
/* breakpoint_here_p (PC) returns non-zero if an enabled breakpoint
|
|
|
|
|
exists at PC. It returns ordinary_breakpoint_here if it's an
|
|
|
|
|
ordinary breakpoint, or permanent_breakpoint_here if it's a
|
|
|
|
|
permanent breakpoint.
|
|
|
|
|
- When continuing from a location with an ordinary breakpoint, we
|
|
|
|
|
actually single step once before calling insert_breakpoints.
|
|
|
|
|
- When continuing from a localion with a permanent breakpoint, we
|
|
|
|
|
need to use the `SKIP_PERMANENT_BREAKPOINT' macro, provided by
|
|
|
|
|
the target, to advance the PC past the breakpoint. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-09-22 05:28:34 +02:00
|
|
|
|
enum breakpoint_here
|
2000-07-30 03:48:28 +02:00
|
|
|
|
breakpoint_here_p (CORE_ADDR pc)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-11-15 07:52:53 +01:00
|
|
|
|
const struct bp_location *bpt;
|
1999-09-22 05:28:34 +02:00
|
|
|
|
int any_breakpoint_here = 0;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-11-06 19:27:34 +01:00
|
|
|
|
ALL_BP_LOCATIONS (bpt)
|
|
|
|
|
{
|
|
|
|
|
if (bpt->loc_type != bp_loc_software_breakpoint
|
|
|
|
|
&& bpt->loc_type != bp_loc_hardware_breakpoint)
|
|
|
|
|
continue;
|
|
|
|
|
|
2003-12-12 20:04:46 +01:00
|
|
|
|
if ((breakpoint_enabled (bpt->owner)
|
2003-11-06 19:27:34 +01:00
|
|
|
|
|| bpt->owner->enable_state == bp_permanent)
|
|
|
|
|
&& bpt->address == pc) /* bp is enabled and matches pc */
|
|
|
|
|
{
|
|
|
|
|
if (overlay_debugging
|
|
|
|
|
&& section_is_overlay (bpt->section)
|
|
|
|
|
&& !section_is_mapped (bpt->section))
|
|
|
|
|
continue; /* unmapped overlay -- can't be a match */
|
|
|
|
|
else if (bpt->owner->enable_state == bp_permanent)
|
|
|
|
|
return permanent_breakpoint_here;
|
|
|
|
|
else
|
|
|
|
|
any_breakpoint_here = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-09-22 05:28:34 +02:00
|
|
|
|
return any_breakpoint_here ? ordinary_breakpoint_here : 0;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
1999-09-22 05:28:34 +02:00
|
|
|
|
|
2007-11-29 08:48:21 +01:00
|
|
|
|
/* Returns non-zero if there's a breakpoint inserted at PC, which is
|
|
|
|
|
inserted using regular breakpoint_chain/bp_location_chain mechanism.
|
|
|
|
|
This does not check for single-step breakpoints, which are
|
|
|
|
|
inserted and removed using direct target manipulation. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
int
|
2007-11-29 08:48:21 +01:00
|
|
|
|
regular_breakpoint_inserted_here_p (CORE_ADDR pc)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-11-15 07:52:53 +01:00
|
|
|
|
const struct bp_location *bpt;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-11-06 19:27:34 +01:00
|
|
|
|
ALL_BP_LOCATIONS (bpt)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2003-11-06 19:27:34 +01:00
|
|
|
|
if (bpt->loc_type != bp_loc_software_breakpoint
|
|
|
|
|
&& bpt->loc_type != bp_loc_hardware_breakpoint)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (bpt->inserted
|
|
|
|
|
&& bpt->address == pc) /* bp is inserted and matches pc */
|
|
|
|
|
{
|
|
|
|
|
if (overlay_debugging
|
|
|
|
|
&& section_is_overlay (bpt->section)
|
|
|
|
|
&& !section_is_mapped (bpt->section))
|
|
|
|
|
continue; /* unmapped overlay -- can't be a match */
|
|
|
|
|
else
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
2007-11-29 08:48:21 +01:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Returns non-zero iff there's either regular breakpoint
|
|
|
|
|
or a single step breakpoint inserted at PC. */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
breakpoint_inserted_here_p (CORE_ADDR pc)
|
|
|
|
|
{
|
|
|
|
|
if (regular_breakpoint_inserted_here_p (pc))
|
|
|
|
|
return 1;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2007-05-11 14:44:34 +02:00
|
|
|
|
if (single_step_breakpoint_inserted_here_p (pc))
|
|
|
|
|
return 1;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2004-01-31 20:18:13 +01:00
|
|
|
|
/* This function returns non-zero iff there is a software breakpoint
|
|
|
|
|
inserted at PC. */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
software_breakpoint_inserted_here_p (CORE_ADDR pc)
|
|
|
|
|
{
|
2007-11-15 07:52:53 +01:00
|
|
|
|
const struct bp_location *bpt;
|
2004-01-31 20:18:13 +01:00
|
|
|
|
int any_breakpoint_here = 0;
|
|
|
|
|
|
|
|
|
|
ALL_BP_LOCATIONS (bpt)
|
|
|
|
|
{
|
|
|
|
|
if (bpt->loc_type != bp_loc_software_breakpoint)
|
|
|
|
|
continue;
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (bpt->inserted
|
2004-01-31 20:18:13 +01:00
|
|
|
|
&& bpt->address == pc) /* bp is enabled and matches pc */
|
|
|
|
|
{
|
|
|
|
|
if (overlay_debugging
|
|
|
|
|
&& section_is_overlay (bpt->section)
|
|
|
|
|
&& !section_is_mapped (bpt->section))
|
|
|
|
|
continue; /* unmapped overlay -- can't be a match */
|
|
|
|
|
else
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2007-05-11 14:44:34 +02:00
|
|
|
|
/* Also check for software single-step breakpoints. */
|
|
|
|
|
if (single_step_breakpoint_inserted_here_p (pc))
|
|
|
|
|
return 1;
|
|
|
|
|
|
2004-01-31 20:18:13 +01:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2003-11-06 19:27:34 +01:00
|
|
|
|
/* breakpoint_thread_match (PC, PTID) returns true if the breakpoint at
|
|
|
|
|
PC is valid for process/thread PTID. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
int
|
2001-05-04 06:15:33 +02:00
|
|
|
|
breakpoint_thread_match (CORE_ADDR pc, ptid_t ptid)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-11-15 07:52:53 +01:00
|
|
|
|
const struct bp_location *bpt;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
int thread;
|
|
|
|
|
|
2001-05-04 06:15:33 +02:00
|
|
|
|
thread = pid_to_thread_id (ptid);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-11-06 19:27:34 +01:00
|
|
|
|
ALL_BP_LOCATIONS (bpt)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2003-11-06 19:27:34 +01:00
|
|
|
|
if (bpt->loc_type != bp_loc_software_breakpoint
|
|
|
|
|
&& bpt->loc_type != bp_loc_hardware_breakpoint)
|
|
|
|
|
continue;
|
|
|
|
|
|
2003-12-12 20:04:46 +01:00
|
|
|
|
if ((breakpoint_enabled (bpt->owner)
|
2003-11-06 19:27:34 +01:00
|
|
|
|
|| bpt->owner->enable_state == bp_permanent)
|
|
|
|
|
&& bpt->address == pc
|
|
|
|
|
&& (bpt->owner->thread == -1 || bpt->owner->thread == thread))
|
|
|
|
|
{
|
|
|
|
|
if (overlay_debugging
|
|
|
|
|
&& section_is_overlay (bpt->section)
|
|
|
|
|
&& !section_is_mapped (bpt->section))
|
|
|
|
|
continue; /* unmapped overlay -- can't be a match */
|
|
|
|
|
else
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* bpstat stuff. External routines' interfaces are documented
|
|
|
|
|
in breakpoint.h. */
|
|
|
|
|
|
|
|
|
|
int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
ep_is_catchpoint (struct breakpoint *ep)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
return
|
|
|
|
|
(ep->type == bp_catch_load)
|
|
|
|
|
|| (ep->type == bp_catch_unload)
|
|
|
|
|
|| (ep->type == bp_catch_fork)
|
|
|
|
|
|| (ep->type == bp_catch_vfork)
|
Remove unused support for target-based exception catching.
* target.h (struct target_ops): Delete
to_enable_exception_callback and to_get_current_exception_event
members.
(target_enable_exception_callback)
(target_get_current_exception_event): Delete macros.
* target.c (update_current_target): Remove code to inherit and
default those members.
(debug_to_enable_exception_callback)
(debug_to_get_current_exception_event): Delete functions.
(setup_target_debug): Don't install those methods.
* inf-child.c (inf_child_enable_exception_callback)
(inf_child_get_current_exception_event): Delete dummy functions.
(inf_child_target): Don't install them in the target vector.
* breakpoint.h (enum bptype): Delete bp_catch_catch,
bp_catch_throw.
* breakpoint.c (cover_target_enable_exception_callback)
(ep_is_exception_catchpoint, create_exception_catchpoint): Delete
functions.
(insert_bp_location, update_breakpoints_after_exec)
(remove_breakpoint, ep_is_catchpoint, print_it_typical)
(bpstat_stop_status, bpstat_what)
(bpstat_get_triggered_catchpoints, print_one_breakpoint_location)
(user_settable_breakpoint, allocate_bp_location)
(disable_watchpoints_before_interactive_call_start)
(enable_watchpoints_after_interactive_call_stop, mention)
(delete_breakpoint, breakpoint_re_set_one, disable_command)
(enable_command): Remove exception catchpoint cases.
(catch_exception_command_1): Don't try target-based exception
handling.
* stack.c (catch_info): Call print_frame_label_vars
unconditionally.
2007-12-13 03:00:09 +01:00
|
|
|
|
|| (ep->type == bp_catch_exec);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* ??rehrauer: Add more kinds here, as are implemented... */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
ep_is_shlib_catchpoint (struct breakpoint *ep)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
return
|
|
|
|
|
(ep->type == bp_catch_load)
|
2001-03-01 04:50:17 +01:00
|
|
|
|
|| (ep->type == bp_catch_unload);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2007-08-17 19:06:04 +02:00
|
|
|
|
void
|
|
|
|
|
bpstat_free (bpstat bs)
|
|
|
|
|
{
|
|
|
|
|
if (bs->old_val != NULL)
|
|
|
|
|
value_free (bs->old_val);
|
|
|
|
|
free_command_lines (&bs->commands);
|
|
|
|
|
xfree (bs);
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Clear a bpstat so that it says we are not at any breakpoint.
|
|
|
|
|
Also free any storage that is part of a bpstat. */
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
bpstat_clear (bpstat *bsp)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
bpstat p;
|
|
|
|
|
bpstat q;
|
|
|
|
|
|
|
|
|
|
if (bsp == 0)
|
|
|
|
|
return;
|
|
|
|
|
p = *bsp;
|
|
|
|
|
while (p != NULL)
|
|
|
|
|
{
|
|
|
|
|
q = p->next;
|
2007-08-17 19:06:04 +02:00
|
|
|
|
bpstat_free (p);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
p = q;
|
|
|
|
|
}
|
|
|
|
|
*bsp = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Return a copy of a bpstat. Like "bs1 = bs2" but all storage that
|
|
|
|
|
is part of the bpstat is copied as well. */
|
|
|
|
|
|
|
|
|
|
bpstat
|
2000-07-30 03:48:28 +02:00
|
|
|
|
bpstat_copy (bpstat bs)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
bpstat p = NULL;
|
|
|
|
|
bpstat tmp;
|
|
|
|
|
bpstat retval = NULL;
|
|
|
|
|
|
|
|
|
|
if (bs == NULL)
|
|
|
|
|
return bs;
|
|
|
|
|
|
|
|
|
|
for (; bs != NULL; bs = bs->next)
|
|
|
|
|
{
|
|
|
|
|
tmp = (bpstat) xmalloc (sizeof (*tmp));
|
|
|
|
|
memcpy (tmp, bs, sizeof (*tmp));
|
2003-03-11 00:37:29 +01:00
|
|
|
|
if (bs->commands != NULL)
|
|
|
|
|
tmp->commands = copy_command_lines (bs->commands);
|
|
|
|
|
if (bs->old_val != NULL)
|
|
|
|
|
tmp->old_val = value_copy (bs->old_val);
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (p == NULL)
|
|
|
|
|
/* This is the first thing in the chain. */
|
|
|
|
|
retval = tmp;
|
|
|
|
|
else
|
|
|
|
|
p->next = tmp;
|
|
|
|
|
p = tmp;
|
|
|
|
|
}
|
|
|
|
|
p->next = NULL;
|
|
|
|
|
return retval;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Find the bpstat associated with this breakpoint */
|
|
|
|
|
|
|
|
|
|
bpstat
|
2000-07-30 03:48:28 +02:00
|
|
|
|
bpstat_find_breakpoint (bpstat bsp, struct breakpoint *breakpoint)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (bsp == NULL)
|
|
|
|
|
return NULL;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
for (; bsp != NULL; bsp = bsp->next)
|
|
|
|
|
{
|
2007-09-22 19:49:41 +02:00
|
|
|
|
if (bsp->breakpoint_at && bsp->breakpoint_at->owner == breakpoint)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
return bsp;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Find a step_resume breakpoint associated with this bpstat.
|
|
|
|
|
(If there are multiple step_resume bp's on the list, this function
|
|
|
|
|
will arbitrarily pick one.)
|
|
|
|
|
|
|
|
|
|
It is an error to use this function if BPSTAT doesn't contain a
|
|
|
|
|
step_resume breakpoint.
|
|
|
|
|
|
|
|
|
|
See wait_for_inferior's use of this function. */
|
|
|
|
|
struct breakpoint *
|
2000-07-30 03:48:28 +02:00
|
|
|
|
bpstat_find_step_resume_breakpoint (bpstat bsp)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2001-06-02 02:36:20 +02:00
|
|
|
|
int current_thread;
|
|
|
|
|
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
gdb_assert (bsp != NULL);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2001-06-02 02:36:20 +02:00
|
|
|
|
current_thread = pid_to_thread_id (inferior_ptid);
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
for (; bsp != NULL; bsp = bsp->next)
|
|
|
|
|
{
|
|
|
|
|
if ((bsp->breakpoint_at != NULL) &&
|
2007-09-22 19:49:41 +02:00
|
|
|
|
(bsp->breakpoint_at->owner->type == bp_step_resume) &&
|
|
|
|
|
(bsp->breakpoint_at->owner->thread == current_thread ||
|
|
|
|
|
bsp->breakpoint_at->owner->thread == -1))
|
|
|
|
|
return bsp->breakpoint_at->owner;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
internal_error (__FILE__, __LINE__, _("No step_resume breakpoint found."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-03-28 01:01:00 +02:00
|
|
|
|
/* Put in *NUM the breakpoint number of the first breakpoint we are stopped
|
1999-04-16 03:35:26 +02:00
|
|
|
|
at. *BSP upon return is a bpstat which points to the remaining
|
|
|
|
|
breakpoints stopped at (but which is not guaranteed to be good for
|
|
|
|
|
anything but further calls to bpstat_num).
|
2007-03-28 01:01:00 +02:00
|
|
|
|
Return 0 if passed a bpstat which does not indicate any breakpoints.
|
|
|
|
|
Return -1 if stopped at a breakpoint that has been deleted since
|
|
|
|
|
we set it.
|
|
|
|
|
Return 1 otherwise. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
int
|
2007-03-28 01:01:00 +02:00
|
|
|
|
bpstat_num (bpstat *bsp, int *num)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
|
|
|
|
|
if ((*bsp) == NULL)
|
|
|
|
|
return 0; /* No more breakpoint values */
|
2007-03-28 01:01:00 +02:00
|
|
|
|
|
2007-09-22 19:49:41 +02:00
|
|
|
|
/* We assume we'll never have several bpstats that
|
|
|
|
|
correspond to a single breakpoint -- otherwise,
|
|
|
|
|
this function might return the same number more
|
|
|
|
|
than once and this will look ugly. */
|
|
|
|
|
b = (*bsp)->breakpoint_at ? (*bsp)->breakpoint_at->owner : NULL;
|
2007-03-28 01:01:00 +02:00
|
|
|
|
*bsp = (*bsp)->next;
|
|
|
|
|
if (b == NULL)
|
|
|
|
|
return -1; /* breakpoint that's been deleted since */
|
|
|
|
|
|
|
|
|
|
*num = b->number; /* We have its number */
|
|
|
|
|
return 1;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Modify BS so that the actions will not be performed. */
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
bpstat_clear_actions (bpstat bs)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
for (; bs != NULL; bs = bs->next)
|
|
|
|
|
{
|
2002-08-27 03:09:09 +02:00
|
|
|
|
free_command_lines (&bs->commands);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (bs->old_val != NULL)
|
|
|
|
|
{
|
|
|
|
|
value_free (bs->old_val);
|
|
|
|
|
bs->old_val = NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Stub for cleaning up our state if we error-out of a breakpoint command */
|
|
|
|
|
static void
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
* breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto.
* defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto.
* exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto.
* objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto.
* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
2003-01-18 16:55:53 +01:00
|
|
|
|
cleanup_executing_breakpoints (void *ignore)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
executing_breakpoint_commands = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Execute all the commands associated with all the breakpoints at this
|
|
|
|
|
location. Any of these commands could cause the process to proceed
|
|
|
|
|
beyond this point, etc. We look out for such changes by checking
|
|
|
|
|
the global "breakpoint_proceeded" after each command. */
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
bpstat_do_actions (bpstat *bsp)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
bpstat bs;
|
|
|
|
|
struct cleanup *old_chain;
|
|
|
|
|
|
|
|
|
|
/* Avoid endless recursion if a `source' command is contained
|
|
|
|
|
in bs->commands. */
|
|
|
|
|
if (executing_breakpoint_commands)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
executing_breakpoint_commands = 1;
|
|
|
|
|
old_chain = make_cleanup (cleanup_executing_breakpoints, 0);
|
|
|
|
|
|
|
|
|
|
top:
|
|
|
|
|
/* Note that (as of this writing), our callers all appear to
|
|
|
|
|
be passing us the address of global stop_bpstat. And, if
|
|
|
|
|
our calls to execute_control_command cause the inferior to
|
|
|
|
|
proceed, that global (and hence, *bsp) will change.
|
|
|
|
|
|
|
|
|
|
We must be careful to not touch *bsp unless the inferior
|
|
|
|
|
has not proceeded. */
|
|
|
|
|
|
|
|
|
|
/* This pointer will iterate over the list of bpstat's. */
|
|
|
|
|
bs = *bsp;
|
|
|
|
|
|
|
|
|
|
breakpoint_proceeded = 0;
|
|
|
|
|
for (; bs != NULL; bs = bs->next)
|
|
|
|
|
{
|
2003-12-22 04:43:19 +01:00
|
|
|
|
struct command_line *cmd;
|
|
|
|
|
struct cleanup *this_cmd_tree_chain;
|
|
|
|
|
|
|
|
|
|
/* Take ownership of the BSP's command tree, if it has one.
|
|
|
|
|
|
|
|
|
|
The command tree could legitimately contain commands like
|
|
|
|
|
'step' and 'next', which call clear_proceed_status, which
|
|
|
|
|
frees stop_bpstat's command tree. To make sure this doesn't
|
|
|
|
|
free the tree we're executing out from under us, we need to
|
|
|
|
|
take ownership of the tree ourselves. Since a given bpstat's
|
|
|
|
|
commands are only executed once, we don't need to copy it; we
|
|
|
|
|
can clear the pointer in the bpstat, and make sure we free
|
|
|
|
|
the tree when we're done. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
cmd = bs->commands;
|
2003-12-22 04:43:19 +01:00
|
|
|
|
bs->commands = 0;
|
|
|
|
|
this_cmd_tree_chain = make_cleanup_free_command_lines (&cmd);
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
while (cmd != NULL)
|
|
|
|
|
{
|
|
|
|
|
execute_control_command (cmd);
|
|
|
|
|
|
|
|
|
|
if (breakpoint_proceeded)
|
|
|
|
|
break;
|
|
|
|
|
else
|
|
|
|
|
cmd = cmd->next;
|
|
|
|
|
}
|
2003-12-22 04:43:19 +01:00
|
|
|
|
|
|
|
|
|
/* We can free this command tree now. */
|
|
|
|
|
do_cleanups (this_cmd_tree_chain);
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (breakpoint_proceeded)
|
2008-03-14 19:57:44 +01:00
|
|
|
|
{
|
|
|
|
|
if (target_can_async_p ())
|
|
|
|
|
/* If we are in async mode, then the target might
|
|
|
|
|
be still running, not stopped at any breakpoint,
|
|
|
|
|
so nothing for us to do here -- just return to
|
|
|
|
|
the event loop. */
|
|
|
|
|
break;
|
|
|
|
|
else
|
|
|
|
|
/* In sync mode, when execute_control_command returns
|
|
|
|
|
we're already standing on the next breakpoint.
|
|
|
|
|
Breakpoint commands for that stop were not run,
|
|
|
|
|
since execute_command does not run breakpoint
|
|
|
|
|
commands -- only command_line_handler does, but
|
|
|
|
|
that one is not involved in execution of breakpoint
|
|
|
|
|
commands. So, we can now execute breakpoint commands.
|
|
|
|
|
There's an implicit assumption that we're called with
|
|
|
|
|
stop_bpstat, so our parameter is the new bpstat to
|
|
|
|
|
handle.
|
|
|
|
|
It should be noted that making execute_command do
|
|
|
|
|
bpstat actions is not an option -- in this case we'll
|
|
|
|
|
have recursive invocation of bpstat for each breakpoint
|
|
|
|
|
with a command, and can easily blow up GDB stack. */
|
|
|
|
|
goto top;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2002-08-27 03:09:09 +02:00
|
|
|
|
do_cleanups (old_chain);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2008-03-03 14:24:12 +01:00
|
|
|
|
/* Print out the (old or new) value associated with a watchpoint. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
watchpoint_value_print (struct value *val, struct ui_file *stream)
|
|
|
|
|
{
|
|
|
|
|
if (val == NULL)
|
|
|
|
|
fprintf_unfiltered (stream, _("<unreadable>"));
|
|
|
|
|
else
|
|
|
|
|
value_print (val, stream, 0, Val_pretty_default);
|
|
|
|
|
}
|
|
|
|
|
|
1999-10-26 05:43:48 +02:00
|
|
|
|
/* This is the normal print function for a bpstat. In the future,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
much of this logic could (should?) be moved to bpstat_stop_status,
|
1999-10-26 05:43:48 +02:00
|
|
|
|
by having it set different print_it values.
|
|
|
|
|
|
|
|
|
|
Current scheme: When we stop, bpstat_print() is called. It loops
|
|
|
|
|
through the bpstat list of things causing this stop, calling the
|
|
|
|
|
print_bp_stop_message function on each one. The behavior of the
|
|
|
|
|
print_bp_stop_message function depends on the print_it field of
|
|
|
|
|
bpstat. If such field so indicates, call this function here.
|
|
|
|
|
|
|
|
|
|
Return values from this routine (ultimately used by bpstat_print()
|
|
|
|
|
and normal_stop() to decide what to do):
|
|
|
|
|
PRINT_NOTHING: Means we already printed all we needed to print,
|
|
|
|
|
don't print anything else.
|
|
|
|
|
PRINT_SRC_ONLY: Means we printed something, and we do *not* desire
|
|
|
|
|
that something to be followed by a location.
|
|
|
|
|
PRINT_SCR_AND_LOC: Means we printed something, and we *do* desire
|
|
|
|
|
that something to be followed by a location.
|
|
|
|
|
PRINT_UNKNOWN: Means we printed nothing or we need to do some more
|
|
|
|
|
analysis. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-10-19 04:47:02 +02:00
|
|
|
|
static enum print_stop_action
|
2000-07-30 03:48:28 +02:00
|
|
|
|
print_it_typical (bpstat bs)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
struct cleanup *old_chain, *ui_out_chain;
|
2007-09-22 19:49:41 +02:00
|
|
|
|
struct breakpoint *b;
|
2007-11-15 07:52:53 +01:00
|
|
|
|
const struct bp_location *bl;
|
2000-02-03 05:14:45 +01:00
|
|
|
|
struct ui_stream *stb;
|
2008-04-15 16:32:12 +02:00
|
|
|
|
int bp_temp = 0;
|
2000-02-03 05:14:45 +01:00
|
|
|
|
stb = ui_out_stream_new (uiout);
|
2000-05-15 05:16:15 +02:00
|
|
|
|
old_chain = make_cleanup_ui_out_stream_delete (stb);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* bs->breakpoint_at can be NULL if it was a momentary breakpoint
|
|
|
|
|
which has since been deleted. */
|
1999-10-26 05:43:48 +02:00
|
|
|
|
if (bs->breakpoint_at == NULL)
|
1999-10-19 04:47:02 +02:00
|
|
|
|
return PRINT_UNKNOWN;
|
2007-09-23 09:56:22 +02:00
|
|
|
|
bl = bs->breakpoint_at;
|
|
|
|
|
b = bl->owner;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2007-09-22 19:49:41 +02:00
|
|
|
|
switch (b->type)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-10-26 05:43:48 +02:00
|
|
|
|
case bp_breakpoint:
|
|
|
|
|
case bp_hardware_breakpoint:
|
2008-04-15 16:32:12 +02:00
|
|
|
|
bp_temp = bs->breakpoint_at->owner->disposition == disp_del;
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (bl->address != bl->requested_address)
|
|
|
|
|
breakpoint_adjustment_warning (bl->requested_address,
|
|
|
|
|
bl->address,
|
2007-09-22 19:49:41 +02:00
|
|
|
|
b->number, 1);
|
|
|
|
|
annotate_breakpoint (b->number);
|
2008-04-15 16:32:12 +02:00
|
|
|
|
if (bp_temp)
|
|
|
|
|
ui_out_text (uiout, "\nTemporary breakpoint ");
|
|
|
|
|
else
|
|
|
|
|
ui_out_text (uiout, "\nBreakpoint ");
|
2001-07-06 05:53:11 +02:00
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
2008-04-15 16:32:12 +02:00
|
|
|
|
{
|
|
|
|
|
ui_out_field_string (uiout, "reason",
|
|
|
|
|
async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT));
|
|
|
|
|
ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
|
|
|
|
|
}
|
2007-09-22 19:49:41 +02:00
|
|
|
|
ui_out_field_int (uiout, "bkptno", b->number);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, ", ");
|
|
|
|
|
return PRINT_SRC_AND_LOC;
|
1999-10-26 05:43:48 +02:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_shlib_event:
|
1999-10-19 04:47:02 +02:00
|
|
|
|
/* Did we stop because the user set the stop_on_solib_events
|
|
|
|
|
variable? (If so, we report this as a generic, "Stopped due
|
|
|
|
|
to shlib event" message.) */
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Stopped due to shared library event\n"));
|
1999-10-26 05:43:48 +02:00
|
|
|
|
return PRINT_NOTHING;
|
|
|
|
|
break;
|
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
case bp_thread_event:
|
|
|
|
|
/* Not sure how we will get here.
|
|
|
|
|
GDB should not stop for these breakpoints. */
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Thread Event Breakpoint: gdb should not stop!\n"));
|
1999-12-14 02:06:04 +01:00
|
|
|
|
return PRINT_NOTHING;
|
|
|
|
|
break;
|
|
|
|
|
|
2002-02-06 19:31:07 +01:00
|
|
|
|
case bp_overlay_event:
|
|
|
|
|
/* By analogy with the thread event, GDB should not stop for these. */
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Overlay Event Breakpoint: gdb should not stop!\n"));
|
2002-02-06 19:31:07 +01:00
|
|
|
|
return PRINT_NOTHING;
|
|
|
|
|
break;
|
|
|
|
|
|
1999-10-26 05:43:48 +02:00
|
|
|
|
case bp_catch_load:
|
2007-09-22 19:49:41 +02:00
|
|
|
|
annotate_catchpoint (b->number);
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("\nCatchpoint %d (loaded %s), "),
|
2007-09-22 19:49:41 +02:00
|
|
|
|
b->number,
|
|
|
|
|
b->triggered_dll_pathname);
|
1999-10-26 05:43:48 +02:00
|
|
|
|
return PRINT_SRC_AND_LOC;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_catch_unload:
|
2007-09-22 19:49:41 +02:00
|
|
|
|
annotate_catchpoint (b->number);
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("\nCatchpoint %d (unloaded %s), "),
|
2007-09-22 19:49:41 +02:00
|
|
|
|
b->number,
|
|
|
|
|
b->triggered_dll_pathname);
|
1999-10-26 05:43:48 +02:00
|
|
|
|
return PRINT_SRC_AND_LOC;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_catch_fork:
|
2007-09-22 19:49:41 +02:00
|
|
|
|
annotate_catchpoint (b->number);
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("\nCatchpoint %d (forked process %d), "),
|
2007-09-22 19:49:41 +02:00
|
|
|
|
b->number,
|
|
|
|
|
b->forked_inferior_pid);
|
1999-10-19 04:47:02 +02:00
|
|
|
|
return PRINT_SRC_AND_LOC;
|
1999-10-26 05:43:48 +02:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_catch_vfork:
|
2007-09-22 19:49:41 +02:00
|
|
|
|
annotate_catchpoint (b->number);
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("\nCatchpoint %d (vforked process %d), "),
|
2007-09-22 19:49:41 +02:00
|
|
|
|
b->number,
|
|
|
|
|
b->forked_inferior_pid);
|
1999-10-26 05:43:48 +02:00
|
|
|
|
return PRINT_SRC_AND_LOC;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_catch_exec:
|
2007-09-22 19:49:41 +02:00
|
|
|
|
annotate_catchpoint (b->number);
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("\nCatchpoint %d (exec'd %s), "),
|
2007-09-22 19:49:41 +02:00
|
|
|
|
b->number,
|
|
|
|
|
b->exec_pathname);
|
1999-10-19 04:47:02 +02:00
|
|
|
|
return PRINT_SRC_AND_LOC;
|
1999-10-26 05:43:48 +02:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_watchpoint:
|
|
|
|
|
case bp_hardware_watchpoint:
|
2008-03-03 14:24:12 +01:00
|
|
|
|
annotate_watchpoint (b->number);
|
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
|
|
|
|
ui_out_field_string
|
|
|
|
|
(uiout, "reason",
|
|
|
|
|
async_reason_lookup (EXEC_ASYNC_WATCHPOINT_TRIGGER));
|
|
|
|
|
mention (b);
|
|
|
|
|
ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
|
|
|
|
|
ui_out_text (uiout, "\nOld value = ");
|
|
|
|
|
watchpoint_value_print (bs->old_val, stb->stream);
|
|
|
|
|
ui_out_field_stream (uiout, "old", stb);
|
|
|
|
|
ui_out_text (uiout, "\nNew value = ");
|
|
|
|
|
watchpoint_value_print (b->val, stb->stream);
|
|
|
|
|
ui_out_field_stream (uiout, "new", stb);
|
|
|
|
|
do_cleanups (ui_out_chain);
|
|
|
|
|
ui_out_text (uiout, "\n");
|
1999-10-26 05:43:48 +02:00
|
|
|
|
/* More than one watchpoint may have been triggered. */
|
|
|
|
|
return PRINT_UNKNOWN;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_read_watchpoint:
|
2001-07-06 05:53:11 +02:00
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
2005-05-29 05:13:19 +02:00
|
|
|
|
ui_out_field_string
|
|
|
|
|
(uiout, "reason",
|
|
|
|
|
async_reason_lookup (EXEC_ASYNC_READ_WATCHPOINT_TRIGGER));
|
2007-09-22 19:49:41 +02:00
|
|
|
|
mention (b);
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, "\nValue = ");
|
2008-03-03 14:24:12 +01:00
|
|
|
|
watchpoint_value_print (b->val, stb->stream);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_field_stream (uiout, "value", stb);
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
do_cleanups (ui_out_chain);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, "\n");
|
1999-10-19 04:47:02 +02:00
|
|
|
|
return PRINT_UNKNOWN;
|
1999-10-26 05:43:48 +02:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_access_watchpoint:
|
2008-03-03 14:24:12 +01:00
|
|
|
|
if (bs->old_val != NULL)
|
2000-02-03 05:14:45 +01:00
|
|
|
|
{
|
2007-09-22 19:49:41 +02:00
|
|
|
|
annotate_watchpoint (b->number);
|
2001-07-06 05:53:11 +02:00
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
2005-05-29 05:13:19 +02:00
|
|
|
|
ui_out_field_string
|
|
|
|
|
(uiout, "reason",
|
|
|
|
|
async_reason_lookup (EXEC_ASYNC_ACCESS_WATCHPOINT_TRIGGER));
|
2007-09-22 19:49:41 +02:00
|
|
|
|
mention (b);
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, "\nOld value = ");
|
2008-03-03 14:24:12 +01:00
|
|
|
|
watchpoint_value_print (bs->old_val, stb->stream);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_field_stream (uiout, "old", stb);
|
|
|
|
|
ui_out_text (uiout, "\nNew value = ");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2007-09-22 19:49:41 +02:00
|
|
|
|
mention (b);
|
2001-07-06 05:53:11 +02:00
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
2005-05-29 05:13:19 +02:00
|
|
|
|
ui_out_field_string
|
|
|
|
|
(uiout, "reason",
|
|
|
|
|
async_reason_lookup (EXEC_ASYNC_ACCESS_WATCHPOINT_TRIGGER));
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, "\nValue = ");
|
|
|
|
|
}
|
2008-03-03 14:24:12 +01:00
|
|
|
|
watchpoint_value_print (b->val, stb->stream);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_field_stream (uiout, "new", stb);
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
do_cleanups (ui_out_chain);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, "\n");
|
1999-10-19 04:47:02 +02:00
|
|
|
|
return PRINT_UNKNOWN;
|
1999-10-26 05:43:48 +02:00
|
|
|
|
break;
|
1999-11-17 03:31:06 +01:00
|
|
|
|
|
1999-10-26 05:43:48 +02:00
|
|
|
|
/* Fall through, we don't deal with these types of breakpoints
|
|
|
|
|
here. */
|
|
|
|
|
|
1999-11-09 02:23:30 +01:00
|
|
|
|
case bp_finish:
|
2001-07-06 05:53:11 +02:00
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
2005-05-29 05:13:19 +02:00
|
|
|
|
ui_out_field_string
|
|
|
|
|
(uiout, "reason",
|
|
|
|
|
async_reason_lookup (EXEC_ASYNC_FUNCTION_FINISHED));
|
2000-02-03 05:14:45 +01:00
|
|
|
|
return PRINT_UNKNOWN;
|
|
|
|
|
break;
|
|
|
|
|
|
1999-10-26 05:43:48 +02:00
|
|
|
|
case bp_until:
|
2001-07-06 05:53:11 +02:00
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
2006-06-02 05:43:18 +02:00
|
|
|
|
ui_out_field_string
|
|
|
|
|
(uiout, "reason",
|
|
|
|
|
async_reason_lookup (EXEC_ASYNC_LOCATION_REACHED));
|
2000-02-03 05:14:45 +01:00
|
|
|
|
return PRINT_UNKNOWN;
|
|
|
|
|
break;
|
|
|
|
|
|
1999-12-07 04:56:43 +01:00
|
|
|
|
case bp_none:
|
1999-10-26 05:43:48 +02:00
|
|
|
|
case bp_longjmp:
|
|
|
|
|
case bp_longjmp_resume:
|
|
|
|
|
case bp_step_resume:
|
|
|
|
|
case bp_watchpoint_scope:
|
|
|
|
|
case bp_call_dummy:
|
|
|
|
|
default:
|
|
|
|
|
return PRINT_UNKNOWN;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Generic routine for printing messages indicating why we
|
|
|
|
|
stopped. The behavior of this function depends on the value
|
|
|
|
|
'print_it' in the bpstat structure. Under some circumstances we
|
|
|
|
|
may decide not to print anything here and delegate the task to
|
|
|
|
|
normal_stop(). */
|
|
|
|
|
|
|
|
|
|
static enum print_stop_action
|
|
|
|
|
print_bp_stop_message (bpstat bs)
|
|
|
|
|
{
|
|
|
|
|
switch (bs->print_it)
|
|
|
|
|
{
|
|
|
|
|
case print_it_noop:
|
|
|
|
|
/* Nothing should be printed for this bpstat entry. */
|
|
|
|
|
return PRINT_UNKNOWN;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case print_it_done:
|
|
|
|
|
/* We still want to print the frame, but we already printed the
|
|
|
|
|
relevant messages. */
|
|
|
|
|
return PRINT_SRC_AND_LOC;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case print_it_normal:
|
2007-09-22 19:49:41 +02:00
|
|
|
|
{
|
2007-11-15 07:52:53 +01:00
|
|
|
|
const struct bp_location *bl = bs->breakpoint_at;
|
2007-09-22 19:49:41 +02:00
|
|
|
|
struct breakpoint *b = bl ? bl->owner : NULL;
|
|
|
|
|
|
|
|
|
|
/* Normal case. Call the breakpoint's print_it method, or
|
|
|
|
|
print_it_typical. */
|
|
|
|
|
/* FIXME: how breakpoint can ever be NULL here? */
|
|
|
|
|
if (b != NULL && b->ops != NULL && b->ops->print_it != NULL)
|
|
|
|
|
return b->ops->print_it (b);
|
|
|
|
|
else
|
|
|
|
|
return print_it_typical (bs);
|
|
|
|
|
}
|
|
|
|
|
break;
|
2003-04-27 03:11:10 +02:00
|
|
|
|
|
1999-10-26 05:43:48 +02:00
|
|
|
|
default:
|
2001-02-08 07:03:54 +01:00
|
|
|
|
internal_error (__FILE__, __LINE__,
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
_("print_bp_stop_message: unrecognized enum value"));
|
1999-10-26 05:43:48 +02:00
|
|
|
|
break;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1999-10-26 05:43:48 +02:00
|
|
|
|
/* Print a message indicating what happened. This is called from
|
|
|
|
|
normal_stop(). The input to this routine is the head of the bpstat
|
|
|
|
|
list - a list of the eventpoints that caused this stop. This
|
|
|
|
|
routine calls the generic print routine for printing a message
|
|
|
|
|
about reasons for stopping. This will print (for example) the
|
|
|
|
|
"Breakpoint n," part of the output. The return value of this
|
|
|
|
|
routine is one of:
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-10-19 04:47:02 +02:00
|
|
|
|
PRINT_UNKNOWN: Means we printed nothing
|
|
|
|
|
PRINT_SRC_AND_LOC: Means we printed something, and expect subsequent
|
1999-07-07 22:19:36 +02:00
|
|
|
|
code to print the location. An example is
|
|
|
|
|
"Breakpoint 1, " which should be followed by
|
|
|
|
|
the location.
|
1999-10-19 04:47:02 +02:00
|
|
|
|
PRINT_SRC_ONLY: Means we printed something, but there is no need
|
1999-07-07 22:19:36 +02:00
|
|
|
|
to also print the location part of the message.
|
|
|
|
|
An example is the catch/throw messages, which
|
1999-10-19 04:47:02 +02:00
|
|
|
|
don't require a location appended to the end.
|
|
|
|
|
PRINT_NOTHING: We have done some printing and we don't need any
|
|
|
|
|
further info to be printed.*/
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-10-19 04:47:02 +02:00
|
|
|
|
enum print_stop_action
|
2000-07-30 03:48:28 +02:00
|
|
|
|
bpstat_print (bpstat bs)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
int val;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Maybe another breakpoint in the chain caused us to stop.
|
1999-08-24 00:40:00 +02:00
|
|
|
|
(Currently all watchpoints go on the bpstat whether hit or not.
|
|
|
|
|
That probably could (should) be changed, provided care is taken
|
1999-04-16 03:35:26 +02:00
|
|
|
|
with respect to bpstat_explains_signal). */
|
1999-10-26 05:43:48 +02:00
|
|
|
|
for (; bs; bs = bs->next)
|
|
|
|
|
{
|
|
|
|
|
val = print_bp_stop_message (bs);
|
|
|
|
|
if (val == PRINT_SRC_ONLY
|
|
|
|
|
|| val == PRINT_SRC_AND_LOC
|
|
|
|
|
|| val == PRINT_NOTHING)
|
|
|
|
|
return val;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-10-26 05:43:48 +02:00
|
|
|
|
/* We reached the end of the chain, or we got a null BS to start
|
|
|
|
|
with and nothing was printed. */
|
1999-10-19 04:47:02 +02:00
|
|
|
|
return PRINT_UNKNOWN;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Evaluate the expression EXP and return 1 if value is zero.
|
|
|
|
|
This is used inside a catch_errors to evaluate the breakpoint condition.
|
|
|
|
|
The argument is a "struct expression *" that has been cast to char * to
|
|
|
|
|
make it pass through catch_errors. */
|
|
|
|
|
|
|
|
|
|
static int
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
* breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto.
* defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto.
* exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto.
* objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto.
* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
2003-01-18 16:55:53 +01:00
|
|
|
|
breakpoint_cond_eval (void *exp)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2001-10-21 01:54:29 +02:00
|
|
|
|
struct value *mark = value_mark ();
|
1999-07-07 22:19:36 +02:00
|
|
|
|
int i = !value_true (evaluate_expression ((struct expression *) exp));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
value_free_to_mark (mark);
|
|
|
|
|
return i;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Allocate a new bpstat and chain it to the current one. */
|
|
|
|
|
|
|
|
|
|
static bpstat
|
2007-11-15 07:52:53 +01:00
|
|
|
|
bpstat_alloc (const struct bp_location *bl, bpstat cbs /* Current "bs" value */ )
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
bpstat bs;
|
|
|
|
|
|
|
|
|
|
bs = (bpstat) xmalloc (sizeof (*bs));
|
|
|
|
|
cbs->next = bs;
|
2007-09-22 19:49:41 +02:00
|
|
|
|
bs->breakpoint_at = bl;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* If the condition is false, etc., don't do the commands. */
|
|
|
|
|
bs->commands = NULL;
|
|
|
|
|
bs->old_val = NULL;
|
|
|
|
|
bs->print_it = print_it_normal;
|
|
|
|
|
return bs;
|
|
|
|
|
}
|
|
|
|
|
|
2007-10-01 02:17:58 +02:00
|
|
|
|
/* The target has stopped with waitstatus WS. Check if any hardware
|
|
|
|
|
watchpoints have triggered, according to the target. */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
watchpoints_triggered (struct target_waitstatus *ws)
|
|
|
|
|
{
|
|
|
|
|
int stopped_by_watchpoint = STOPPED_BY_WATCHPOINT (*ws);
|
|
|
|
|
CORE_ADDR addr;
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
|
|
|
|
|
if (!stopped_by_watchpoint)
|
|
|
|
|
{
|
|
|
|
|
/* We were not stopped by a watchpoint. Mark all watchpoints
|
|
|
|
|
as not triggered. */
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->type == bp_hardware_watchpoint
|
|
|
|
|
|| b->type == bp_read_watchpoint
|
|
|
|
|
|| b->type == bp_access_watchpoint)
|
|
|
|
|
b->watchpoint_triggered = watch_triggered_no;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!target_stopped_data_address (¤t_target, &addr))
|
|
|
|
|
{
|
|
|
|
|
/* We were stopped by a watchpoint, but we don't know where.
|
|
|
|
|
Mark all watchpoints as unknown. */
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->type == bp_hardware_watchpoint
|
|
|
|
|
|| b->type == bp_read_watchpoint
|
|
|
|
|
|| b->type == bp_access_watchpoint)
|
|
|
|
|
b->watchpoint_triggered = watch_triggered_unknown;
|
|
|
|
|
|
|
|
|
|
return stopped_by_watchpoint;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* The target could report the data address. Mark watchpoints
|
|
|
|
|
affected by this data address as triggered, and all others as not
|
|
|
|
|
triggered. */
|
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->type == bp_hardware_watchpoint
|
|
|
|
|
|| b->type == bp_read_watchpoint
|
|
|
|
|
|| b->type == bp_access_watchpoint)
|
|
|
|
|
{
|
2008-01-29 18:52:47 +01:00
|
|
|
|
struct bp_location *loc;
|
2007-10-01 02:17:58 +02:00
|
|
|
|
struct value *v;
|
|
|
|
|
|
|
|
|
|
b->watchpoint_triggered = watch_triggered_no;
|
2008-01-29 18:52:47 +01:00
|
|
|
|
for (loc = b->loc; loc; loc = loc->next)
|
|
|
|
|
/* Exact match not required. Within range is
|
|
|
|
|
sufficient. */
|
2008-05-02 13:07:25 +02:00
|
|
|
|
if (target_watchpoint_addr_within_range (¤t_target,
|
|
|
|
|
addr, loc->address,
|
|
|
|
|
loc->length))
|
2008-01-29 18:52:47 +01:00
|
|
|
|
{
|
|
|
|
|
b->watchpoint_triggered = watch_triggered_yes;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2007-10-01 02:17:58 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Possible return values for watchpoint_check (this can't be an enum
|
|
|
|
|
because of check_errors). */
|
|
|
|
|
/* The watchpoint has been deleted. */
|
|
|
|
|
#define WP_DELETED 1
|
|
|
|
|
/* The value has changed. */
|
|
|
|
|
#define WP_VALUE_CHANGED 2
|
|
|
|
|
/* The value has not changed. */
|
|
|
|
|
#define WP_VALUE_NOT_CHANGED 3
|
|
|
|
|
|
|
|
|
|
#define BP_TEMPFLAG 1
|
|
|
|
|
#define BP_HARDWAREFLAG 2
|
|
|
|
|
|
|
|
|
|
/* Check watchpoint condition. */
|
|
|
|
|
|
|
|
|
|
static int
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
* breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto.
* defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto.
* exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto.
* objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto.
* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
2003-01-18 16:55:53 +01:00
|
|
|
|
watchpoint_check (void *p)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
bpstat bs = (bpstat) p;
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
struct frame_info *fr;
|
|
|
|
|
int within_current_scope;
|
|
|
|
|
|
2007-09-22 19:49:41 +02:00
|
|
|
|
b = bs->breakpoint_at->owner;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
if (b->exp_valid_block == NULL)
|
|
|
|
|
within_current_scope = 1;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* There is no current frame at this moment. If we're going to have
|
1999-07-07 22:19:36 +02:00
|
|
|
|
any chance of handling watchpoints on local variables, we'll need
|
|
|
|
|
the frame chain (so we can determine if we're in scope). */
|
|
|
|
|
reinit_frame_cache ();
|
2002-06-11 01:25:50 +02:00
|
|
|
|
fr = frame_find_by_id (b->watchpoint_frame);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
within_current_scope = (fr != NULL);
|
2006-12-18 23:10:13 +01:00
|
|
|
|
|
|
|
|
|
/* If we've gotten confused in the unwinder, we might have
|
|
|
|
|
returned a frame that can't describe this variable. */
|
|
|
|
|
if (within_current_scope
|
|
|
|
|
&& block_function (b->exp_valid_block) != get_frame_function (fr))
|
|
|
|
|
within_current_scope = 0;
|
|
|
|
|
|
2001-11-06 12:02:12 +01:00
|
|
|
|
/* in_function_epilogue_p() returns a non-zero value if we're still
|
|
|
|
|
in the function but the stack frame has already been invalidated.
|
|
|
|
|
Since we can't rely on the values of local variables after the
|
|
|
|
|
stack has been destroyed, we are treating the watchpoint in that
|
2003-09-04 19:41:48 +02:00
|
|
|
|
state as `not changed' without further checking.
|
|
|
|
|
|
|
|
|
|
vinschen/2003-09-04: The former implementation left out the case
|
|
|
|
|
that the watchpoint frame couldn't be found by frame_find_by_id()
|
|
|
|
|
because the current PC is currently in an epilogue. Calling
|
|
|
|
|
gdbarch_in_function_epilogue_p() also when fr == NULL fixes that. */
|
2003-09-04 19:24:53 +02:00
|
|
|
|
if ((!within_current_scope || fr == get_current_frame ())
|
2001-11-06 12:02:12 +01:00
|
|
|
|
&& gdbarch_in_function_epilogue_p (current_gdbarch, read_pc ()))
|
|
|
|
|
return WP_VALUE_NOT_CHANGED;
|
2003-09-04 19:24:53 +02:00
|
|
|
|
if (fr && within_current_scope)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* If we end up stopping, the current frame will get selected
|
|
|
|
|
in normal_stop. So this call to select_frame won't affect
|
|
|
|
|
the user. */
|
2002-05-05 03:15:13 +02:00
|
|
|
|
select_frame (fr);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (within_current_scope)
|
|
|
|
|
{
|
|
|
|
|
/* We use value_{,free_to_}mark because it could be a
|
|
|
|
|
*long* time before we return to the command level and
|
1999-07-07 22:19:36 +02:00
|
|
|
|
call free_all_values. We can't call free_all_values because
|
|
|
|
|
we might be in the middle of evaluating a function call. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2001-10-21 01:54:29 +02:00
|
|
|
|
struct value *mark = value_mark ();
|
2008-03-03 14:24:12 +01:00
|
|
|
|
struct value *new_val;
|
|
|
|
|
|
|
|
|
|
fetch_watchpoint_value (b->exp, &new_val, NULL, NULL);
|
|
|
|
|
if ((b->val != NULL) != (new_val != NULL)
|
|
|
|
|
|| (b->val != NULL && !value_equal (b->val, new_val)))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2008-03-03 14:24:12 +01:00
|
|
|
|
if (new_val != NULL)
|
|
|
|
|
{
|
|
|
|
|
release_value (new_val);
|
|
|
|
|
value_free_to_mark (mark);
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
bs->old_val = b->val;
|
|
|
|
|
b->val = new_val;
|
2008-03-03 14:24:12 +01:00
|
|
|
|
b->val_valid = 1;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* We will stop here */
|
|
|
|
|
return WP_VALUE_CHANGED;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* Nothing changed, don't do anything. */
|
|
|
|
|
value_free_to_mark (mark);
|
|
|
|
|
/* We won't stop here */
|
|
|
|
|
return WP_VALUE_NOT_CHANGED;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* This seems like the only logical thing to do because
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if we temporarily ignored the watchpoint, then when
|
|
|
|
|
we reenter the block in which it is valid it contains
|
|
|
|
|
garbage (in the case of a function, it may have two
|
|
|
|
|
garbage values, one before and one after the prologue).
|
|
|
|
|
So we can't even detect the first assignment to it and
|
|
|
|
|
watch after that (since the garbage may or may not equal
|
|
|
|
|
the first value assigned). */
|
1999-11-17 03:31:06 +01:00
|
|
|
|
/* We print all the stop information in print_it_typical(), but
|
|
|
|
|
in this case, by the time we call print_it_typical() this bp
|
|
|
|
|
will be deleted already. So we have no choice but print the
|
|
|
|
|
information here. */
|
2001-07-06 05:53:11 +02:00
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
2005-05-29 05:13:19 +02:00
|
|
|
|
ui_out_field_string
|
|
|
|
|
(uiout, "reason", async_reason_lookup (EXEC_ASYNC_WATCHPOINT_SCOPE));
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, "\nWatchpoint ");
|
2007-09-22 19:49:41 +02:00
|
|
|
|
ui_out_field_int (uiout, "wpnum", b->number);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, " deleted because the program has left the block in\n\
|
|
|
|
|
which its expression is valid.\n");
|
1999-11-17 03:31:06 +01:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (b->related_breakpoint)
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->related_breakpoint->disposition = disp_del_at_next_stop;
|
|
|
|
|
b->disposition = disp_del_at_next_stop;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
return WP_DELETED;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2008-04-24 14:56:45 +02:00
|
|
|
|
/* Return true if it looks like target has stopped due to hitting
|
|
|
|
|
breakpoint location BL. This function does not check if we
|
|
|
|
|
should stop, only if BL explains the stop. */
|
|
|
|
|
static int
|
|
|
|
|
bpstat_check_location (const struct bp_location *bl, CORE_ADDR bp_addr)
|
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b = bl->owner;
|
|
|
|
|
|
|
|
|
|
if (b->type != bp_watchpoint
|
|
|
|
|
&& b->type != bp_hardware_watchpoint
|
|
|
|
|
&& b->type != bp_read_watchpoint
|
|
|
|
|
&& b->type != bp_access_watchpoint
|
|
|
|
|
&& b->type != bp_hardware_breakpoint
|
|
|
|
|
&& b->type != bp_catch_fork
|
|
|
|
|
&& b->type != bp_catch_vfork
|
|
|
|
|
&& b->type != bp_catch_exec) /* a non-watchpoint bp */
|
|
|
|
|
{
|
|
|
|
|
if (bl->address != bp_addr) /* address doesn't match */
|
|
|
|
|
return 0;
|
|
|
|
|
if (overlay_debugging /* unmapped overlay section */
|
|
|
|
|
&& section_is_overlay (bl->section)
|
|
|
|
|
&& !section_is_mapped (bl->section))
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Continuable hardware watchpoints are treated as non-existent if the
|
|
|
|
|
reason we stopped wasn't a hardware watchpoint (we didn't stop on
|
|
|
|
|
some data address). Otherwise gdb won't stop on a break instruction
|
|
|
|
|
in the code (not from a breakpoint) when a hardware watchpoint has
|
|
|
|
|
been defined. Also skip watchpoints which we know did not trigger
|
|
|
|
|
(did not match the data address). */
|
|
|
|
|
|
|
|
|
|
if ((b->type == bp_hardware_watchpoint
|
|
|
|
|
|| b->type == bp_read_watchpoint
|
|
|
|
|
|| b->type == bp_access_watchpoint)
|
|
|
|
|
&& b->watchpoint_triggered == watch_triggered_no)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if (b->type == bp_hardware_breakpoint)
|
|
|
|
|
{
|
|
|
|
|
if (bl->address != bp_addr)
|
|
|
|
|
return 0;
|
|
|
|
|
if (overlay_debugging /* unmapped overlay section */
|
|
|
|
|
&& section_is_overlay (bl->section)
|
|
|
|
|
&& !section_is_mapped (bl->section))
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Is this a catchpoint of a load or unload? If so, did we
|
|
|
|
|
get a load or unload of the specified library? If not,
|
|
|
|
|
ignore it. */
|
|
|
|
|
if ((b->type == bp_catch_load)
|
|
|
|
|
#if defined(SOLIB_HAVE_LOAD_EVENT)
|
|
|
|
|
&& (!SOLIB_HAVE_LOAD_EVENT (PIDGET (inferior_ptid))
|
|
|
|
|
|| ((b->dll_pathname != NULL)
|
|
|
|
|
&& (strcmp (b->dll_pathname,
|
|
|
|
|
SOLIB_LOADED_LIBRARY_PATHNAME (
|
|
|
|
|
PIDGET (inferior_ptid)))
|
|
|
|
|
!= 0)))
|
|
|
|
|
#endif
|
|
|
|
|
)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if ((b->type == bp_catch_unload)
|
|
|
|
|
#if defined(SOLIB_HAVE_UNLOAD_EVENT)
|
|
|
|
|
&& (!SOLIB_HAVE_UNLOAD_EVENT (PIDGET (inferior_ptid))
|
|
|
|
|
|| ((b->dll_pathname != NULL)
|
|
|
|
|
&& (strcmp (b->dll_pathname,
|
|
|
|
|
SOLIB_UNLOADED_LIBRARY_PATHNAME (
|
|
|
|
|
PIDGET (inferior_ptid)))
|
|
|
|
|
!= 0)))
|
|
|
|
|
#endif
|
|
|
|
|
)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if ((b->type == bp_catch_fork)
|
|
|
|
|
&& !inferior_has_forked (PIDGET (inferior_ptid),
|
|
|
|
|
&b->forked_inferior_pid))
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if ((b->type == bp_catch_vfork)
|
|
|
|
|
&& !inferior_has_vforked (PIDGET (inferior_ptid),
|
|
|
|
|
&b->forked_inferior_pid))
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if ((b->type == bp_catch_exec)
|
|
|
|
|
&& !inferior_has_execd (PIDGET (inferior_ptid), &b->exec_pathname))
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* If BS refers to a watchpoint, determine if the watched values
|
|
|
|
|
has actually changed, and we should stop. If not, set BS->stop
|
|
|
|
|
to 0. */
|
|
|
|
|
static void
|
|
|
|
|
bpstat_check_watchpoint (bpstat bs)
|
|
|
|
|
{
|
|
|
|
|
const struct bp_location *bl = bs->breakpoint_at;
|
|
|
|
|
struct breakpoint *b = bl->owner;
|
|
|
|
|
|
|
|
|
|
if (b->type == bp_watchpoint
|
|
|
|
|
|| b->type == bp_read_watchpoint
|
|
|
|
|
|| b->type == bp_access_watchpoint
|
|
|
|
|
|| b->type == bp_hardware_watchpoint)
|
|
|
|
|
{
|
|
|
|
|
CORE_ADDR addr;
|
|
|
|
|
struct value *v;
|
|
|
|
|
int must_check_value = 0;
|
|
|
|
|
|
|
|
|
|
if (b->type == bp_watchpoint)
|
|
|
|
|
/* For a software watchpoint, we must always check the
|
|
|
|
|
watched value. */
|
|
|
|
|
must_check_value = 1;
|
|
|
|
|
else if (b->watchpoint_triggered == watch_triggered_yes)
|
|
|
|
|
/* We have a hardware watchpoint (read, write, or access)
|
|
|
|
|
and the target earlier reported an address watched by
|
|
|
|
|
this watchpoint. */
|
|
|
|
|
must_check_value = 1;
|
|
|
|
|
else if (b->watchpoint_triggered == watch_triggered_unknown
|
|
|
|
|
&& b->type == bp_hardware_watchpoint)
|
|
|
|
|
/* We were stopped by a hardware watchpoint, but the target could
|
|
|
|
|
not report the data address. We must check the watchpoint's
|
|
|
|
|
value. Access and read watchpoints are out of luck; without
|
|
|
|
|
a data address, we can't figure it out. */
|
|
|
|
|
must_check_value = 1;
|
|
|
|
|
|
|
|
|
|
if (must_check_value)
|
|
|
|
|
{
|
|
|
|
|
char *message = xstrprintf ("Error evaluating expression for watchpoint %d\n",
|
|
|
|
|
b->number);
|
|
|
|
|
struct cleanup *cleanups = make_cleanup (xfree, message);
|
|
|
|
|
int e = catch_errors (watchpoint_check, bs, message,
|
|
|
|
|
RETURN_MASK_ALL);
|
|
|
|
|
do_cleanups (cleanups);
|
|
|
|
|
switch (e)
|
|
|
|
|
{
|
|
|
|
|
case WP_DELETED:
|
|
|
|
|
/* We've already printed what needs to be printed. */
|
|
|
|
|
bs->print_it = print_it_done;
|
|
|
|
|
/* 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;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case WP_VALUE_NOT_CHANGED:
|
|
|
|
|
if (b->type == bp_hardware_watchpoint
|
|
|
|
|
|| b->type == bp_watchpoint)
|
|
|
|
|
{
|
|
|
|
|
/* Don't stop: write watchpoints shouldn't fire if
|
|
|
|
|
the value hasn't changed. */
|
|
|
|
|
bs->print_it = print_it_noop;
|
|
|
|
|
bs->stop = 0;
|
|
|
|
|
}
|
|
|
|
|
/* Stop. */
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
/* Can't happen. */
|
|
|
|
|
case 0:
|
|
|
|
|
/* Error from catch_errors. */
|
|
|
|
|
printf_filtered (_("Watchpoint %d deleted.\n"), b->number);
|
|
|
|
|
if (b->related_breakpoint)
|
|
|
|
|
b->related_breakpoint->disposition = disp_del_at_next_stop;
|
|
|
|
|
b->disposition = disp_del_at_next_stop;
|
|
|
|
|
/* We've already printed what needs to be printed. */
|
|
|
|
|
bs->print_it = print_it_done;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else /* must_check_value == 0 */
|
|
|
|
|
{
|
|
|
|
|
/* This is a case where some watchpoint(s) triggered, but
|
|
|
|
|
not at the address of this watchpoint, or else no
|
|
|
|
|
watchpoint triggered after all. So don't print
|
|
|
|
|
anything for this watchpoint. */
|
|
|
|
|
bs->print_it = print_it_noop;
|
|
|
|
|
bs->stop = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Check conditions (condition proper, frame, thread and ignore count)
|
|
|
|
|
of breakpoint referred to by BS. If we should not stop for this
|
|
|
|
|
breakpoint, set BS->stop to 0. */
|
|
|
|
|
static void
|
|
|
|
|
bpstat_check_breakpoint_conditions (bpstat bs, ptid_t ptid)
|
|
|
|
|
{
|
|
|
|
|
int thread_id = pid_to_thread_id (ptid);
|
|
|
|
|
const struct bp_location *bl = bs->breakpoint_at;
|
|
|
|
|
struct breakpoint *b = bl->owner;
|
|
|
|
|
|
|
|
|
|
if (frame_id_p (b->frame_id)
|
|
|
|
|
&& !frame_id_eq (b->frame_id, get_frame_id (get_current_frame ())))
|
|
|
|
|
bs->stop = 0;
|
|
|
|
|
else if (bs->stop)
|
|
|
|
|
{
|
|
|
|
|
int value_is_zero = 0;
|
|
|
|
|
|
|
|
|
|
/* If this is a scope breakpoint, mark the associated
|
|
|
|
|
watchpoint as triggered so that we will handle the
|
|
|
|
|
out-of-scope event. We'll get to the watchpoint next
|
|
|
|
|
iteration. */
|
|
|
|
|
if (b->type == bp_watchpoint_scope)
|
|
|
|
|
b->related_breakpoint->watchpoint_triggered = watch_triggered_yes;
|
|
|
|
|
|
|
|
|
|
if (bl->cond && bl->owner->disposition != disp_del_at_next_stop)
|
|
|
|
|
{
|
|
|
|
|
/* Need to select the frame, with all that implies
|
|
|
|
|
so that the conditions will have the right context. */
|
|
|
|
|
select_frame (get_current_frame ());
|
|
|
|
|
value_is_zero
|
|
|
|
|
= catch_errors (breakpoint_cond_eval, (bl->cond),
|
|
|
|
|
"Error in testing breakpoint condition:\n",
|
|
|
|
|
RETURN_MASK_ALL);
|
|
|
|
|
/* FIXME-someday, should give breakpoint # */
|
|
|
|
|
free_all_values ();
|
|
|
|
|
}
|
|
|
|
|
if (bl->cond && value_is_zero)
|
|
|
|
|
{
|
|
|
|
|
bs->stop = 0;
|
|
|
|
|
}
|
|
|
|
|
else if (b->thread != -1 && b->thread != thread_id)
|
|
|
|
|
{
|
|
|
|
|
bs->stop = 0;
|
|
|
|
|
}
|
|
|
|
|
else if (b->ignore_count > 0)
|
|
|
|
|
{
|
|
|
|
|
b->ignore_count--;
|
|
|
|
|
annotate_ignore_count_change ();
|
|
|
|
|
bs->stop = 0;
|
|
|
|
|
/* Increase the hit count even though we don't
|
|
|
|
|
stop. */
|
|
|
|
|
++(b->hit_count);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2004-01-31 20:59:06 +01:00
|
|
|
|
/* Get a bpstat associated with having just stopped at address
|
2007-10-01 02:17:58 +02:00
|
|
|
|
BP_ADDR in thread PTID.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2007-10-01 02:17:58 +02:00
|
|
|
|
Determine whether we stopped at a breakpoint, etc, or whether we
|
1999-04-16 03:35:26 +02:00
|
|
|
|
don't understand this stop. Result is a chain of bpstat's such that:
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if we don't understand the stop, the result is a null pointer.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if we understand why we stopped, the result is not null.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
Each element of the chain refers to a particular breakpoint or
|
|
|
|
|
watchpoint at which we have stopped. (We may have stopped for
|
|
|
|
|
several reasons concurrently.)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
Each element of the chain has valid next, breakpoint_at,
|
|
|
|
|
commands, FIXME??? fields. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
bpstat
|
2007-10-01 02:17:58 +02:00
|
|
|
|
bpstat_stop_status (CORE_ADDR bp_addr, ptid_t ptid)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
struct breakpoint *b = NULL;
|
2007-11-15 07:52:53 +01:00
|
|
|
|
const struct bp_location *bl;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Root of the chain of bpstat's */
|
|
|
|
|
struct bpstats root_bs[1];
|
|
|
|
|
/* Pointer to the last thing in the chain currently. */
|
|
|
|
|
bpstat bs = root_bs;
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
ALL_BP_LOCATIONS (bl)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
b = bl->owner;
|
|
|
|
|
gdb_assert (b);
|
2003-12-12 20:04:46 +01:00
|
|
|
|
if (!breakpoint_enabled (b) && b->enable_state != bp_permanent)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
continue;
|
|
|
|
|
|
2008-01-29 18:52:47 +01:00
|
|
|
|
/* For hardware watchpoints, we look only at the first location.
|
|
|
|
|
The watchpoint_check function will work on entire expression,
|
|
|
|
|
not the individual locations. For read watchopints, the
|
|
|
|
|
watchpoints_triggered function have checked all locations
|
|
|
|
|
alrea
|
|
|
|
|
*/
|
|
|
|
|
if (b->type == bp_hardware_watchpoint && bl != b->loc)
|
|
|
|
|
continue;
|
|
|
|
|
|
2008-04-24 14:56:45 +02:00
|
|
|
|
if (!bpstat_check_location (bl, bp_addr))
|
|
|
|
|
continue;
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* Come here if it's a watchpoint, or if the break address matches */
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
bs = bpstat_alloc (bl, bs); /* Alloc a bpstat to explain stop */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2008-04-24 14:56:45 +02:00
|
|
|
|
/* Assume we stop. Should we find watchpoint that is not actually
|
|
|
|
|
triggered, or if condition of breakpoint is false, we'll reset
|
|
|
|
|
'stop' to 0. */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
bs->stop = 1;
|
|
|
|
|
bs->print = 1;
|
|
|
|
|
|
2008-04-24 14:56:45 +02:00
|
|
|
|
bpstat_check_watchpoint (bs);
|
|
|
|
|
if (!bs->stop)
|
|
|
|
|
continue;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2008-04-24 14:56:45 +02:00
|
|
|
|
if (b->type == bp_thread_event || b->type == bp_overlay_event)
|
|
|
|
|
/* We do not stop for these. */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
bs->stop = 0;
|
|
|
|
|
else
|
2008-04-24 14:56:45 +02:00
|
|
|
|
bpstat_check_breakpoint_conditions (bs, ptid);
|
|
|
|
|
|
|
|
|
|
if (bs->stop)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2008-04-24 14:56:45 +02:00
|
|
|
|
++(b->hit_count);
|
2007-10-01 02:17:58 +02:00
|
|
|
|
|
2008-04-24 14:56:45 +02:00
|
|
|
|
/* We will stop here */
|
|
|
|
|
if (b->disposition == disp_disable)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2008-04-24 14:56:45 +02:00
|
|
|
|
b->enable_state = bp_disabled;
|
|
|
|
|
update_global_location_list ();
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
2008-04-24 14:56:45 +02:00
|
|
|
|
if (b->silent)
|
|
|
|
|
bs->print = 0;
|
|
|
|
|
bs->commands = b->commands;
|
|
|
|
|
if (bs->commands &&
|
|
|
|
|
(strcmp ("silent", bs->commands->line) == 0
|
|
|
|
|
|| (xdb_commands && strcmp ("Q", bs->commands->line) == 0)))
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2008-04-24 14:56:45 +02:00
|
|
|
|
bs->commands = bs->commands->next;
|
|
|
|
|
bs->print = 0;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
2008-04-24 14:56:45 +02:00
|
|
|
|
bs->commands = copy_command_lines (bs->commands);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
2008-04-24 14:56:45 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* Print nothing for this entry if we dont stop or if we dont print. */
|
|
|
|
|
if (bs->stop == 0 || bs->print == 0)
|
|
|
|
|
bs->print_it = print_it_noop;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
bs->next = NULL; /* Terminate the chain */
|
|
|
|
|
bs = root_bs->next; /* Re-grab the head of the chain */
|
|
|
|
|
|
2007-10-01 02:17:58 +02:00
|
|
|
|
/* If we aren't stopping, the value of some hardware watchpoint may
|
|
|
|
|
not have changed, but the intermediate memory locations we are
|
|
|
|
|
watching may have. Don't bother if we're stopping; this will get
|
|
|
|
|
done later. */
|
|
|
|
|
for (bs = root_bs->next; bs != NULL; bs = bs->next)
|
|
|
|
|
if (bs->stop)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
if (bs == NULL)
|
|
|
|
|
for (bs = root_bs->next; bs != NULL; bs = bs->next)
|
|
|
|
|
if (!bs->stop
|
|
|
|
|
&& (bs->breakpoint_at->owner->type == bp_hardware_watchpoint
|
|
|
|
|
|| bs->breakpoint_at->owner->type == bp_read_watchpoint
|
|
|
|
|
|| bs->breakpoint_at->owner->type == bp_access_watchpoint))
|
|
|
|
|
{
|
2008-01-29 18:52:47 +01:00
|
|
|
|
/* remove/insert can invalidate bs->breakpoint_at, if this
|
|
|
|
|
location is no longer used by the watchpoint. Prevent
|
|
|
|
|
further code from trying to use it. */
|
|
|
|
|
bs->breakpoint_at = NULL;
|
2007-10-01 02:17:58 +02:00
|
|
|
|
remove_breakpoints ();
|
|
|
|
|
insert_breakpoints ();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return root_bs->next;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Tell what to do about this bpstat. */
|
|
|
|
|
struct bpstat_what
|
2000-07-30 03:48:28 +02:00
|
|
|
|
bpstat_what (bpstat bs)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
/* Classify each bpstat as one of the following. */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
enum class
|
|
|
|
|
{
|
|
|
|
|
/* This bpstat element has no effect on the main_action. */
|
|
|
|
|
no_effect = 0,
|
|
|
|
|
|
|
|
|
|
/* There was a watchpoint, stop but don't print. */
|
|
|
|
|
wp_silent,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* There was a watchpoint, stop and print. */
|
|
|
|
|
wp_noisy,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* There was a breakpoint but we're not stopping. */
|
|
|
|
|
bp_nostop,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* There was a breakpoint, stop but don't print. */
|
|
|
|
|
bp_silent,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* There was a breakpoint, stop and print. */
|
|
|
|
|
bp_noisy,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* We hit the longjmp breakpoint. */
|
|
|
|
|
long_jump,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* We hit the longjmp_resume breakpoint. */
|
|
|
|
|
long_resume,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* We hit the step_resume breakpoint. */
|
|
|
|
|
step_resume,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* We hit the shared library event breakpoint. */
|
|
|
|
|
shlib_event,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* We caught a shared library event. */
|
|
|
|
|
catch_shlib_event,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* This is just used to count how many enums there are. */
|
|
|
|
|
class_last
|
1999-04-16 03:35:26 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Here is the table which drives this routine. So that we can
|
|
|
|
|
format it pretty, we define some abbreviations for the
|
|
|
|
|
enum bpstat_what codes. */
|
|
|
|
|
#define kc BPSTAT_WHAT_KEEP_CHECKING
|
|
|
|
|
#define ss BPSTAT_WHAT_STOP_SILENT
|
|
|
|
|
#define sn BPSTAT_WHAT_STOP_NOISY
|
|
|
|
|
#define sgl BPSTAT_WHAT_SINGLE
|
|
|
|
|
#define slr BPSTAT_WHAT_SET_LONGJMP_RESUME
|
|
|
|
|
#define clr BPSTAT_WHAT_CLEAR_LONGJMP_RESUME
|
|
|
|
|
#define sr BPSTAT_WHAT_STEP_RESUME
|
|
|
|
|
#define shl BPSTAT_WHAT_CHECK_SHLIBS
|
|
|
|
|
#define shlr BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK
|
|
|
|
|
|
|
|
|
|
/* "Can't happen." Might want to print an error message.
|
|
|
|
|
abort() is not out of the question, but chances are GDB is just
|
|
|
|
|
a bit confused, not unusable. */
|
|
|
|
|
#define err BPSTAT_WHAT_STOP_NOISY
|
|
|
|
|
|
|
|
|
|
/* Given an old action and a class, come up with a new action. */
|
|
|
|
|
/* One interesting property of this table is that wp_silent is the same
|
|
|
|
|
as bp_silent and wp_noisy is the same as bp_noisy. That is because
|
|
|
|
|
after stopping, the check for whether to step over a breakpoint
|
|
|
|
|
(BPSTAT_WHAT_SINGLE type stuff) is handled in proceed() without
|
1999-08-24 00:40:00 +02:00
|
|
|
|
reference to how we stopped. We retain separate wp_silent and
|
|
|
|
|
bp_silent codes in case we want to change that someday.
|
1999-07-05 19:58:44 +02:00
|
|
|
|
|
|
|
|
|
Another possibly interesting property of this table is that
|
|
|
|
|
there's a partial ordering, priority-like, of the actions. Once
|
|
|
|
|
you've decided that some action is appropriate, you'll never go
|
|
|
|
|
back and decide something of a lower priority is better. The
|
|
|
|
|
ordering is:
|
|
|
|
|
|
2007-04-13 15:50:32 +02:00
|
|
|
|
kc < clr sgl shl shlr slr sn sr ss
|
2008-04-25 16:50:10 +02:00
|
|
|
|
sgl < shl shlr slr sn sr ss
|
2007-04-13 15:50:32 +02:00
|
|
|
|
slr < err shl shlr sn sr ss
|
2008-04-25 16:50:10 +02:00
|
|
|
|
clr < err shl shlr sn sr ss
|
2007-04-13 15:50:32 +02:00
|
|
|
|
ss < shl shlr sn sr
|
|
|
|
|
sn < shl shlr sr
|
2007-04-13 15:33:10 +02:00
|
|
|
|
shl < shlr sr
|
|
|
|
|
shlr < sr
|
2007-04-13 15:50:32 +02:00
|
|
|
|
sr <
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-07-05 19:58:44 +02:00
|
|
|
|
What I think this means is that we don't need a damned table
|
|
|
|
|
here. If you just put the rows and columns in the right order,
|
|
|
|
|
it'd look awfully regular. We could simply walk the bpstat list
|
|
|
|
|
and choose the highest priority action we find, with a little
|
2008-04-25 16:50:10 +02:00
|
|
|
|
logic to handle the 'err' cases. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* step_resume entries: a step resume breakpoint overrides another
|
|
|
|
|
breakpoint of signal handling (see comment in wait_for_inferior
|
2004-05-01 18:52:30 +02:00
|
|
|
|
at where we set the step_resume breakpoint). */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
static const enum bpstat_what_main_action
|
1999-07-07 22:19:36 +02:00
|
|
|
|
table[(int) class_last][(int) BPSTAT_WHAT_LAST] =
|
|
|
|
|
{
|
|
|
|
|
/* old action */
|
2008-04-25 16:50:10 +02:00
|
|
|
|
/* kc ss sn sgl slr clr sr shl shlr
|
1999-07-07 22:19:36 +02:00
|
|
|
|
*/
|
|
|
|
|
/*no_effect */
|
2008-04-25 16:50:10 +02:00
|
|
|
|
{kc, ss, sn, sgl, slr, clr, sr, shl, shlr},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/*wp_silent */
|
2008-04-25 16:50:10 +02:00
|
|
|
|
{ss, ss, sn, ss, ss, ss, sr, shl, shlr},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/*wp_noisy */
|
2008-04-25 16:50:10 +02:00
|
|
|
|
{sn, sn, sn, sn, sn, sn, sr, shl, shlr},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/*bp_nostop */
|
2008-04-25 16:50:10 +02:00
|
|
|
|
{sgl, ss, sn, sgl, slr, slr, sr, shl, shlr},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/*bp_silent */
|
2008-04-25 16:50:10 +02:00
|
|
|
|
{ss, ss, sn, ss, ss, ss, sr, shl, shlr},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/*bp_noisy */
|
2008-04-25 16:50:10 +02:00
|
|
|
|
{sn, sn, sn, sn, sn, sn, sr, shl, shlr},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/*long_jump */
|
2008-04-25 16:50:10 +02:00
|
|
|
|
{slr, ss, sn, slr, slr, err, sr, shl, shlr},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/*long_resume */
|
2008-04-25 16:50:10 +02:00
|
|
|
|
{clr, ss, sn, err, err, err, sr, shl, shlr},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/*step_resume */
|
2008-04-25 16:50:10 +02:00
|
|
|
|
{sr, sr, sr, sr, sr, sr, sr, sr, sr},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/*shlib */
|
2008-04-25 16:50:10 +02:00
|
|
|
|
{shl, shl, shl, shl, shl, shl, sr, shl, shlr},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/*catch_shlib */
|
2008-04-25 16:50:10 +02:00
|
|
|
|
{shlr, shlr, shlr, shlr, shlr, shlr, sr, shlr, shlr}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
};
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
#undef kc
|
|
|
|
|
#undef ss
|
|
|
|
|
#undef sn
|
|
|
|
|
#undef sgl
|
|
|
|
|
#undef slr
|
|
|
|
|
#undef clr
|
|
|
|
|
#undef err
|
|
|
|
|
#undef sr
|
|
|
|
|
#undef ts
|
|
|
|
|
#undef shl
|
|
|
|
|
#undef shlr
|
|
|
|
|
enum bpstat_what_main_action current_action = BPSTAT_WHAT_KEEP_CHECKING;
|
|
|
|
|
struct bpstat_what retval;
|
|
|
|
|
|
|
|
|
|
retval.call_dummy = 0;
|
|
|
|
|
for (; bs != NULL; bs = bs->next)
|
|
|
|
|
{
|
|
|
|
|
enum class bs_class = no_effect;
|
|
|
|
|
if (bs->breakpoint_at == NULL)
|
|
|
|
|
/* I suspect this can happen if it was a momentary breakpoint
|
|
|
|
|
which has since been deleted. */
|
|
|
|
|
continue;
|
2007-09-22 19:49:41 +02:00
|
|
|
|
switch (bs->breakpoint_at->owner->type)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
case bp_none:
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
case bp_breakpoint:
|
|
|
|
|
case bp_hardware_breakpoint:
|
|
|
|
|
case bp_until:
|
|
|
|
|
case bp_finish:
|
|
|
|
|
if (bs->stop)
|
|
|
|
|
{
|
|
|
|
|
if (bs->print)
|
|
|
|
|
bs_class = bp_noisy;
|
|
|
|
|
else
|
|
|
|
|
bs_class = bp_silent;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
bs_class = bp_nostop;
|
|
|
|
|
break;
|
|
|
|
|
case bp_watchpoint:
|
|
|
|
|
case bp_hardware_watchpoint:
|
|
|
|
|
case bp_read_watchpoint:
|
|
|
|
|
case bp_access_watchpoint:
|
|
|
|
|
if (bs->stop)
|
|
|
|
|
{
|
|
|
|
|
if (bs->print)
|
|
|
|
|
bs_class = wp_noisy;
|
|
|
|
|
else
|
|
|
|
|
bs_class = wp_silent;
|
|
|
|
|
}
|
|
|
|
|
else
|
1999-08-24 00:40:00 +02:00
|
|
|
|
/* There was a watchpoint, but we're not stopping.
|
|
|
|
|
This requires no further action. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
bs_class = no_effect;
|
|
|
|
|
break;
|
|
|
|
|
case bp_longjmp:
|
|
|
|
|
bs_class = long_jump;
|
|
|
|
|
break;
|
|
|
|
|
case bp_longjmp_resume:
|
|
|
|
|
bs_class = long_resume;
|
|
|
|
|
break;
|
|
|
|
|
case bp_step_resume:
|
|
|
|
|
if (bs->stop)
|
|
|
|
|
{
|
|
|
|
|
bs_class = step_resume;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
/* It is for the wrong frame. */
|
|
|
|
|
bs_class = bp_nostop;
|
|
|
|
|
break;
|
|
|
|
|
case bp_watchpoint_scope:
|
|
|
|
|
bs_class = bp_nostop;
|
|
|
|
|
break;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
case bp_shlib_event:
|
|
|
|
|
bs_class = shlib_event;
|
|
|
|
|
break;
|
1999-12-14 02:06:04 +01:00
|
|
|
|
case bp_thread_event:
|
2002-02-06 19:31:07 +01:00
|
|
|
|
case bp_overlay_event:
|
1999-12-14 02:06:04 +01:00
|
|
|
|
bs_class = bp_nostop;
|
|
|
|
|
break;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
case bp_catch_load:
|
|
|
|
|
case bp_catch_unload:
|
|
|
|
|
/* Only if this catchpoint triggered should we cause the
|
|
|
|
|
step-out-of-dld behaviour. Otherwise, we ignore this
|
|
|
|
|
catchpoint. */
|
|
|
|
|
if (bs->stop)
|
|
|
|
|
bs_class = catch_shlib_event;
|
|
|
|
|
else
|
|
|
|
|
bs_class = no_effect;
|
|
|
|
|
break;
|
|
|
|
|
case bp_catch_fork:
|
|
|
|
|
case bp_catch_vfork:
|
|
|
|
|
case bp_catch_exec:
|
|
|
|
|
if (bs->stop)
|
|
|
|
|
{
|
|
|
|
|
if (bs->print)
|
|
|
|
|
bs_class = bp_noisy;
|
|
|
|
|
else
|
|
|
|
|
bs_class = bp_silent;
|
|
|
|
|
}
|
|
|
|
|
else
|
1999-08-24 00:40:00 +02:00
|
|
|
|
/* There was a catchpoint, but we're not stopping.
|
|
|
|
|
This requires no further action. */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
bs_class = no_effect;
|
|
|
|
|
break;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
case bp_call_dummy:
|
1999-08-24 00:40:00 +02:00
|
|
|
|
/* Make sure the action is stop (silent or noisy),
|
|
|
|
|
so infrun.c pops the dummy frame. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
bs_class = bp_silent;
|
|
|
|
|
retval.call_dummy = 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
current_action = table[(int) bs_class][(int) current_action];
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
retval.main_action = current_action;
|
|
|
|
|
return retval;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Nonzero if we should step constantly (e.g. watchpoints on machines
|
|
|
|
|
without hardware support). This isn't related to a specific bpstat,
|
|
|
|
|
just to things like whether watchpoints are set. */
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
bpstat_should_step (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
2003-12-12 20:04:46 +01:00
|
|
|
|
if (breakpoint_enabled (b) && b->type == bp_watchpoint)
|
2001-03-27 22:36:24 +02:00
|
|
|
|
return 1;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Given a bpstat that records zero or more triggered eventpoints, this
|
|
|
|
|
function returns another bpstat which contains only the catchpoints
|
|
|
|
|
on that first list, if any. */
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
bpstat_get_triggered_catchpoints (bpstat ep_list, bpstat *cp_list)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
struct bpstats root_bs[1];
|
|
|
|
|
bpstat bs = root_bs;
|
|
|
|
|
struct breakpoint *ep;
|
|
|
|
|
char *dll_pathname;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
bpstat_clear (cp_list);
|
|
|
|
|
root_bs->next = NULL;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
|
|
|
|
for (; ep_list != NULL; ep_list = ep_list->next)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
/* Is this eventpoint a catchpoint? If not, ignore it. */
|
2007-09-22 19:49:41 +02:00
|
|
|
|
ep = ep_list->breakpoint_at->owner;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (ep == NULL)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
break;
|
|
|
|
|
if ((ep->type != bp_catch_load) &&
|
Remove unused support for target-based exception catching.
* target.h (struct target_ops): Delete
to_enable_exception_callback and to_get_current_exception_event
members.
(target_enable_exception_callback)
(target_get_current_exception_event): Delete macros.
* target.c (update_current_target): Remove code to inherit and
default those members.
(debug_to_enable_exception_callback)
(debug_to_get_current_exception_event): Delete functions.
(setup_target_debug): Don't install those methods.
* inf-child.c (inf_child_enable_exception_callback)
(inf_child_get_current_exception_event): Delete dummy functions.
(inf_child_target): Don't install them in the target vector.
* breakpoint.h (enum bptype): Delete bp_catch_catch,
bp_catch_throw.
* breakpoint.c (cover_target_enable_exception_callback)
(ep_is_exception_catchpoint, create_exception_catchpoint): Delete
functions.
(insert_bp_location, update_breakpoints_after_exec)
(remove_breakpoint, ep_is_catchpoint, print_it_typical)
(bpstat_stop_status, bpstat_what)
(bpstat_get_triggered_catchpoints, print_one_breakpoint_location)
(user_settable_breakpoint, allocate_bp_location)
(disable_watchpoints_before_interactive_call_start)
(enable_watchpoints_after_interactive_call_stop, mention)
(delete_breakpoint, breakpoint_re_set_one, disable_command)
(enable_command): Remove exception catchpoint cases.
(catch_exception_command_1): Don't try target-based exception
handling.
* stack.c (catch_info): Call print_frame_label_vars
unconditionally.
2007-12-13 03:00:09 +01:00
|
|
|
|
(ep->type != bp_catch_unload))
|
1999-08-24 00:40:00 +02:00
|
|
|
|
/* pai: (temp) ADD fork/vfork here!! */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
continue;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Yes; add it to the list. */
|
2007-09-22 19:49:41 +02:00
|
|
|
|
bs = bpstat_alloc (ep_list->breakpoint_at, bs);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
*bs = *ep_list;
|
|
|
|
|
bs->next = NULL;
|
|
|
|
|
bs = root_bs->next;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
#if defined(SOLIB_ADD)
|
|
|
|
|
/* Also, for each triggered catchpoint, tag it with the name of
|
|
|
|
|
the library that caused this trigger. (We copy the name now,
|
|
|
|
|
because it's only guaranteed to be available NOW, when the
|
|
|
|
|
catchpoint triggers. Clients who may wish to know the name
|
|
|
|
|
later must get it from the catchpoint itself.) */
|
|
|
|
|
if (ep->triggered_dll_pathname != NULL)
|
2000-12-15 02:01:51 +01:00
|
|
|
|
xfree (ep->triggered_dll_pathname);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (ep->type == bp_catch_load)
|
2001-05-04 06:15:33 +02:00
|
|
|
|
dll_pathname = SOLIB_LOADED_LIBRARY_PATHNAME (
|
|
|
|
|
PIDGET (inferior_ptid));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else
|
2001-05-04 06:15:33 +02:00
|
|
|
|
dll_pathname = SOLIB_UNLOADED_LIBRARY_PATHNAME (
|
|
|
|
|
PIDGET (inferior_ptid));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
#else
|
|
|
|
|
dll_pathname = NULL;
|
|
|
|
|
#endif
|
|
|
|
|
if (dll_pathname)
|
|
|
|
|
{
|
1999-08-24 00:40:00 +02:00
|
|
|
|
ep->triggered_dll_pathname = (char *)
|
|
|
|
|
xmalloc (strlen (dll_pathname) + 1);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
strcpy (ep->triggered_dll_pathname, dll_pathname);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
ep->triggered_dll_pathname = NULL;
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
*cp_list = bs;
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
static void print_breakpoint_location (struct breakpoint *b,
|
|
|
|
|
struct bp_location *loc,
|
|
|
|
|
char *wrap_indent,
|
|
|
|
|
struct ui_stream *stb)
|
|
|
|
|
{
|
|
|
|
|
if (b->source_file)
|
|
|
|
|
{
|
|
|
|
|
struct symbol *sym
|
|
|
|
|
= find_pc_sect_function (loc->address, loc->section);
|
|
|
|
|
if (sym)
|
|
|
|
|
{
|
|
|
|
|
ui_out_text (uiout, "in ");
|
|
|
|
|
ui_out_field_string (uiout, "func",
|
|
|
|
|
SYMBOL_PRINT_NAME (sym));
|
|
|
|
|
ui_out_wrap_hint (uiout, wrap_indent);
|
|
|
|
|
ui_out_text (uiout, " at ");
|
|
|
|
|
}
|
|
|
|
|
ui_out_field_string (uiout, "file", b->source_file);
|
|
|
|
|
ui_out_text (uiout, ":");
|
|
|
|
|
|
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
|
|
|
|
{
|
|
|
|
|
struct symtab_and_line sal = find_pc_line (loc->address, 0);
|
|
|
|
|
char *fullname = symtab_to_fullname (sal.symtab);
|
|
|
|
|
|
|
|
|
|
if (fullname)
|
|
|
|
|
ui_out_field_string (uiout, "fullname", fullname);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ui_out_field_int (uiout, "line", b->line_number);
|
|
|
|
|
}
|
|
|
|
|
else if (!b->loc)
|
|
|
|
|
{
|
|
|
|
|
ui_out_field_string (uiout, "pending", b->addr_string);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print_address_symbolic (loc->address, stb->stream, demangle, "");
|
|
|
|
|
ui_out_field_stream (uiout, "at", stb);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
/* Print B to gdb_stdout. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
static void
|
2007-09-23 09:56:22 +02:00
|
|
|
|
print_one_breakpoint_location (struct breakpoint *b,
|
|
|
|
|
struct bp_location *loc,
|
|
|
|
|
int loc_number,
|
|
|
|
|
CORE_ADDR *last_addr)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct command_line *l;
|
|
|
|
|
struct symbol *sym;
|
1999-12-14 02:06:04 +01:00
|
|
|
|
struct ep_type_description
|
|
|
|
|
{
|
|
|
|
|
enum bptype type;
|
|
|
|
|
char *description;
|
|
|
|
|
};
|
|
|
|
|
static struct ep_type_description bptypes[] =
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{bp_none, "?deleted?"},
|
|
|
|
|
{bp_breakpoint, "breakpoint"},
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{bp_hardware_breakpoint, "hw breakpoint"},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{bp_until, "until"},
|
|
|
|
|
{bp_finish, "finish"},
|
|
|
|
|
{bp_watchpoint, "watchpoint"},
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{bp_hardware_watchpoint, "hw watchpoint"},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{bp_read_watchpoint, "read watchpoint"},
|
|
|
|
|
{bp_access_watchpoint, "acc watchpoint"},
|
|
|
|
|
{bp_longjmp, "longjmp"},
|
|
|
|
|
{bp_longjmp_resume, "longjmp resume"},
|
|
|
|
|
{bp_step_resume, "step resume"},
|
|
|
|
|
{bp_watchpoint_scope, "watchpoint scope"},
|
|
|
|
|
{bp_call_dummy, "call dummy"},
|
|
|
|
|
{bp_shlib_event, "shlib events"},
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{bp_thread_event, "thread events"},
|
2002-02-06 19:31:07 +01:00
|
|
|
|
{bp_overlay_event, "overlay events"},
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{bp_catch_load, "catch load"},
|
|
|
|
|
{bp_catch_unload, "catch unload"},
|
|
|
|
|
{bp_catch_fork, "catch fork"},
|
|
|
|
|
{bp_catch_vfork, "catch vfork"},
|
Remove unused support for target-based exception catching.
* target.h (struct target_ops): Delete
to_enable_exception_callback and to_get_current_exception_event
members.
(target_enable_exception_callback)
(target_get_current_exception_event): Delete macros.
* target.c (update_current_target): Remove code to inherit and
default those members.
(debug_to_enable_exception_callback)
(debug_to_get_current_exception_event): Delete functions.
(setup_target_debug): Don't install those methods.
* inf-child.c (inf_child_enable_exception_callback)
(inf_child_get_current_exception_event): Delete dummy functions.
(inf_child_target): Don't install them in the target vector.
* breakpoint.h (enum bptype): Delete bp_catch_catch,
bp_catch_throw.
* breakpoint.c (cover_target_enable_exception_callback)
(ep_is_exception_catchpoint, create_exception_catchpoint): Delete
functions.
(insert_bp_location, update_breakpoints_after_exec)
(remove_breakpoint, ep_is_catchpoint, print_it_typical)
(bpstat_stop_status, bpstat_what)
(bpstat_get_triggered_catchpoints, print_one_breakpoint_location)
(user_settable_breakpoint, allocate_bp_location)
(disable_watchpoints_before_interactive_call_start)
(enable_watchpoints_after_interactive_call_stop, mention)
(delete_breakpoint, breakpoint_re_set_one, disable_command)
(enable_command): Remove exception catchpoint cases.
(catch_exception_command_1): Don't try target-based exception
handling.
* stack.c (catch_info): Call print_frame_label_vars
unconditionally.
2007-12-13 03:00:09 +01:00
|
|
|
|
{bp_catch_exec, "catch exec"}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
};
|
1999-12-14 02:06:04 +01:00
|
|
|
|
|
1999-09-22 05:28:34 +02:00
|
|
|
|
static char bpenables[] = "nynny";
|
1999-04-16 03:35:26 +02:00
|
|
|
|
char wrap_indent[80];
|
2000-02-03 05:14:45 +01:00
|
|
|
|
struct ui_stream *stb = ui_out_stream_new (uiout);
|
|
|
|
|
struct cleanup *old_chain = make_cleanup_ui_out_stream_delete (stb);
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
struct cleanup *bkpt_chain;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
int header_of_multiple = 0;
|
|
|
|
|
int part_of_multiple = (loc != NULL);
|
|
|
|
|
|
|
|
|
|
gdb_assert (!loc || loc_number != 0);
|
|
|
|
|
/* See comment in print_one_breakpoint concerning
|
|
|
|
|
treatment of breakpoints with single disabled
|
|
|
|
|
location. */
|
|
|
|
|
if (loc == NULL
|
|
|
|
|
&& (b->loc != NULL
|
|
|
|
|
&& (b->loc->next != NULL || !b->loc->enabled)))
|
|
|
|
|
header_of_multiple = 1;
|
|
|
|
|
if (loc == NULL)
|
|
|
|
|
loc = b->loc;
|
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
annotate_record ();
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
bkpt_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "bkpt");
|
1999-12-14 02:06:04 +01:00
|
|
|
|
|
|
|
|
|
/* 1 */
|
|
|
|
|
annotate_field (0);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (part_of_multiple)
|
|
|
|
|
{
|
|
|
|
|
char *formatted;
|
2007-10-08 17:23:42 +02:00
|
|
|
|
formatted = xstrprintf ("%d.%d", b->number, loc_number);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
ui_out_field_string (uiout, "number", formatted);
|
|
|
|
|
xfree (formatted);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ui_out_field_int (uiout, "number", b->number);
|
|
|
|
|
}
|
1999-12-14 02:06:04 +01:00
|
|
|
|
|
|
|
|
|
/* 2 */
|
|
|
|
|
annotate_field (1);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (part_of_multiple)
|
|
|
|
|
ui_out_field_skip (uiout, "type");
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (((int) b->type >= (sizeof (bptypes) / sizeof (bptypes[0])))
|
|
|
|
|
|| ((int) b->type != bptypes[(int) b->type].type))
|
|
|
|
|
internal_error (__FILE__, __LINE__,
|
|
|
|
|
_("bptypes table does not describe type #%d."),
|
|
|
|
|
(int) b->type);
|
|
|
|
|
ui_out_field_string (uiout, "type", bptypes[(int) b->type].description);
|
|
|
|
|
}
|
1999-12-14 02:06:04 +01:00
|
|
|
|
|
|
|
|
|
/* 3 */
|
|
|
|
|
annotate_field (2);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (part_of_multiple)
|
|
|
|
|
ui_out_field_skip (uiout, "disp");
|
|
|
|
|
else
|
2008-04-15 16:32:12 +02:00
|
|
|
|
ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
|
2007-09-23 09:56:22 +02:00
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
|
|
|
|
|
/* 4 */
|
|
|
|
|
annotate_field (3);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (part_of_multiple)
|
2008-02-26 09:14:11 +01:00
|
|
|
|
ui_out_field_string (uiout, "enabled", loc->enabled ? "y" : "n");
|
2007-09-23 09:56:22 +02:00
|
|
|
|
else
|
2008-02-26 09:14:11 +01:00
|
|
|
|
ui_out_field_fmt (uiout, "enabled", "%c",
|
|
|
|
|
bpenables[(int) b->enable_state]);
|
|
|
|
|
ui_out_spaces (uiout, 2);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
|
|
|
|
|
/* 5 and 6 */
|
|
|
|
|
strcpy (wrap_indent, " ");
|
|
|
|
|
if (addressprint)
|
2001-04-17 22:16:31 +02:00
|
|
|
|
{
|
2007-06-13 19:59:51 +02:00
|
|
|
|
if (gdbarch_addr_bit (current_gdbarch) <= 32)
|
2001-04-17 22:16:31 +02:00
|
|
|
|
strcat (wrap_indent, " ");
|
|
|
|
|
else
|
|
|
|
|
strcat (wrap_indent, " ");
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-04-27 03:11:10 +02:00
|
|
|
|
if (b->ops != NULL && b->ops->print_one != NULL)
|
2007-09-23 09:56:22 +02:00
|
|
|
|
{
|
|
|
|
|
/* Although the print_one can possibly print
|
|
|
|
|
all locations, calling it here is not likely
|
|
|
|
|
to get any nice result. So, make sure there's
|
|
|
|
|
just one location. */
|
|
|
|
|
gdb_assert (b->loc == NULL || b->loc->next == NULL);
|
|
|
|
|
b->ops->print_one (b, last_addr);
|
|
|
|
|
}
|
2003-04-27 03:11:10 +02:00
|
|
|
|
else
|
|
|
|
|
switch (b->type)
|
|
|
|
|
{
|
|
|
|
|
case bp_none:
|
|
|
|
|
internal_error (__FILE__, __LINE__,
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
_("print_one_breakpoint: bp_none encountered\n"));
|
2003-04-27 03:11:10 +02:00
|
|
|
|
break;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-04-27 03:11:10 +02:00
|
|
|
|
case bp_watchpoint:
|
|
|
|
|
case bp_hardware_watchpoint:
|
|
|
|
|
case bp_read_watchpoint:
|
|
|
|
|
case bp_access_watchpoint:
|
|
|
|
|
/* Field 4, the address, is omitted (which makes the columns
|
|
|
|
|
not line up too nicely with the headers, but the effect
|
|
|
|
|
is relatively readable). */
|
|
|
|
|
if (addressprint)
|
|
|
|
|
ui_out_field_skip (uiout, "addr");
|
|
|
|
|
annotate_field (5);
|
|
|
|
|
print_expression (b->exp, stb->stream);
|
|
|
|
|
ui_out_field_stream (uiout, "what", stb);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_catch_load:
|
|
|
|
|
case bp_catch_unload:
|
|
|
|
|
/* Field 4, the address, is omitted (which makes the columns
|
|
|
|
|
not line up too nicely with the headers, but the effect
|
|
|
|
|
is relatively readable). */
|
|
|
|
|
if (addressprint)
|
|
|
|
|
ui_out_field_skip (uiout, "addr");
|
|
|
|
|
annotate_field (5);
|
|
|
|
|
if (b->dll_pathname == NULL)
|
|
|
|
|
{
|
|
|
|
|
ui_out_field_string (uiout, "what", "<any library>");
|
|
|
|
|
ui_out_spaces (uiout, 1);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ui_out_text (uiout, "library \"");
|
|
|
|
|
ui_out_field_string (uiout, "what", b->dll_pathname);
|
|
|
|
|
ui_out_text (uiout, "\" ");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_catch_fork:
|
|
|
|
|
case bp_catch_vfork:
|
|
|
|
|
/* Field 4, the address, is omitted (which makes the columns
|
|
|
|
|
not line up too nicely with the headers, but the effect
|
|
|
|
|
is relatively readable). */
|
|
|
|
|
if (addressprint)
|
|
|
|
|
ui_out_field_skip (uiout, "addr");
|
|
|
|
|
annotate_field (5);
|
|
|
|
|
if (b->forked_inferior_pid != 0)
|
|
|
|
|
{
|
|
|
|
|
ui_out_text (uiout, "process ");
|
|
|
|
|
ui_out_field_int (uiout, "what", b->forked_inferior_pid);
|
|
|
|
|
ui_out_spaces (uiout, 1);
|
|
|
|
|
}
|
2006-02-09 12:24:46 +01:00
|
|
|
|
break;
|
2003-04-27 03:11:10 +02:00
|
|
|
|
|
|
|
|
|
case bp_catch_exec:
|
|
|
|
|
/* Field 4, the address, is omitted (which makes the columns
|
|
|
|
|
not line up too nicely with the headers, but the effect
|
|
|
|
|
is relatively readable). */
|
|
|
|
|
if (addressprint)
|
|
|
|
|
ui_out_field_skip (uiout, "addr");
|
|
|
|
|
annotate_field (5);
|
|
|
|
|
if (b->exec_pathname != NULL)
|
|
|
|
|
{
|
|
|
|
|
ui_out_text (uiout, "program \"");
|
|
|
|
|
ui_out_field_string (uiout, "what", b->exec_pathname);
|
|
|
|
|
ui_out_text (uiout, "\" ");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_breakpoint:
|
|
|
|
|
case bp_hardware_breakpoint:
|
|
|
|
|
case bp_until:
|
|
|
|
|
case bp_finish:
|
|
|
|
|
case bp_longjmp:
|
|
|
|
|
case bp_longjmp_resume:
|
|
|
|
|
case bp_step_resume:
|
|
|
|
|
case bp_watchpoint_scope:
|
|
|
|
|
case bp_call_dummy:
|
|
|
|
|
case bp_shlib_event:
|
|
|
|
|
case bp_thread_event:
|
|
|
|
|
case bp_overlay_event:
|
|
|
|
|
if (addressprint)
|
|
|
|
|
{
|
|
|
|
|
annotate_field (4);
|
2008-02-26 09:14:11 +01:00
|
|
|
|
if (header_of_multiple)
|
2007-09-23 09:56:22 +02:00
|
|
|
|
ui_out_field_string (uiout, "addr", "<MULTIPLE>");
|
2008-04-18 00:43:17 +02:00
|
|
|
|
else if (b->loc == NULL || loc->shlib_disabled)
|
2008-02-26 09:14:11 +01:00
|
|
|
|
ui_out_field_string (uiout, "addr", "<PENDING>");
|
2004-02-02 22:10:49 +01:00
|
|
|
|
else
|
2007-09-23 09:56:22 +02:00
|
|
|
|
ui_out_field_core_addr (uiout, "addr", loc->address);
|
2003-04-27 03:11:10 +02:00
|
|
|
|
}
|
|
|
|
|
annotate_field (5);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (!header_of_multiple)
|
|
|
|
|
print_breakpoint_location (b, loc, wrap_indent, stb);
|
|
|
|
|
if (b->loc)
|
|
|
|
|
*last_addr = b->loc->address;
|
2003-04-27 03:11:10 +02:00
|
|
|
|
break;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (!part_of_multiple && b->thread != -1)
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
2000-02-03 05:14:45 +01:00
|
|
|
|
/* FIXME: This seems to be redundant and lost here; see the
|
|
|
|
|
"stop only in" line a little further down. */
|
|
|
|
|
ui_out_text (uiout, " thread ");
|
|
|
|
|
ui_out_field_int (uiout, "thread", b->thread);
|
1999-12-14 02:06:04 +01:00
|
|
|
|
}
|
|
|
|
|
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, "\n");
|
1999-12-14 02:06:04 +01:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (part_of_multiple && frame_id_p (b->frame_id))
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
|
|
|
|
annotate_field (6);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, "\tstop only in stack frame at ");
|
2002-12-11 23:34:47 +01:00
|
|
|
|
/* FIXME: cagney/2002-12-01: Shouldn't be poeking around inside
|
|
|
|
|
the frame ID. */
|
2003-04-10 05:30:36 +02:00
|
|
|
|
ui_out_field_core_addr (uiout, "frame", b->frame_id.stack_addr);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, "\n");
|
1999-12-14 02:06:04 +01:00
|
|
|
|
}
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (!part_of_multiple && b->cond_string && !ada_exception_catchpoint_p (b))
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
* ada-lang.h (ada_find_printable_frame): Remove.
(ada_exception_catchpoint_p, ada_decode_exception_location)
(ada_decode_assert_location): Add declaration.
* ada-lang.c: Add include of annotate.h and valprint.h.
(exception_catchpoint_kind): New enum.
(function_name_from_pc, is_known_support_routine)
(ada_find_printable_frame, ada_unhandled_exception_name_addr)
(ada_exception_name_addr_1, ada_exception_name_addr)
(print_it_exception, print_one_exception, print_mention_exception)
(print_it_catch_exception, print_one_catch_exception)
(print_mention_catch_exception, catch_exception_breakpoint_ops)
(print_it_catch_exception_unhandled)
(print_one_catch_exception_unhandled)
(print_mention_catch_exception_unhandled, print_it_catch_assert)
(print_one_catch_assert, print_mention_catch_assert)
(ada_exception_catchpoint_p, error_breakpoint_runtime_sym_not_found)
(ada_get_next_arg, catch_ada_exception_command_split)
(ada_exception_sym_name, ada_exception_sym_name)
(ada_exception_breakption_ops, ada_exception_catchpoint_cond_string)
(ada_parse_catchpoint_condition, ada_exception_sal)
(ada_decode_exception_location)
(ada_decode_assert_location): New function.
(catch_exception_unhandled_breakpoint_ops): New global variable.
(catch_assert_breakpoint_ops): New global variable.
* breakpoint.c: Add include of ada-lang.h.
(print_one_breakpoint): Do not print the condition for Ada
exception catchpoints.
(create_ada_exception_breakpoint): New function.
(catch_ada_exception_command, catch_assert_command): New function.
(catch_command_1): Add support for the new "catch exception" and
"catch assert" commands.
(_initialize_breakpoint): Add help description for the new catch
commands.
* Makefile.in (ada-lang.o): Add dependency on annotate.h and
valprint.h.
(breakpoint.o): Add dependency on ada-lang.h.
2007-01-04 06:27:31 +01:00
|
|
|
|
/* We do not print the condition for Ada exception catchpoints
|
|
|
|
|
because the condition is an internal implementation detail
|
|
|
|
|
that we do not want to expose to the user. */
|
1999-12-14 02:06:04 +01:00
|
|
|
|
annotate_field (7);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, "\tstop only if ");
|
2004-02-02 22:10:49 +01:00
|
|
|
|
ui_out_field_string (uiout, "cond", b->cond_string);
|
|
|
|
|
ui_out_text (uiout, "\n");
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (!part_of_multiple && b->thread != -1)
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
|
|
|
|
/* FIXME should make an annotation for this */
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, "\tstop only in thread ");
|
|
|
|
|
ui_out_field_int (uiout, "thread", b->thread);
|
|
|
|
|
ui_out_text (uiout, "\n");
|
1999-12-14 02:06:04 +01:00
|
|
|
|
}
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (!part_of_multiple && show_breakpoint_hit_counts && b->hit_count)
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
|
|
|
|
/* FIXME should make an annotation for this */
|
2000-02-03 05:14:45 +01:00
|
|
|
|
if (ep_is_catchpoint (b))
|
|
|
|
|
ui_out_text (uiout, "\tcatchpoint");
|
|
|
|
|
else
|
|
|
|
|
ui_out_text (uiout, "\tbreakpoint");
|
|
|
|
|
ui_out_text (uiout, " already hit ");
|
|
|
|
|
ui_out_field_int (uiout, "times", b->hit_count);
|
|
|
|
|
if (b->hit_count == 1)
|
|
|
|
|
ui_out_text (uiout, " time\n");
|
|
|
|
|
else
|
|
|
|
|
ui_out_text (uiout, " times\n");
|
1999-12-14 02:06:04 +01:00
|
|
|
|
}
|
|
|
|
|
|
2000-02-23 01:25:43 +01:00
|
|
|
|
/* Output the count also if it is zero, but only if this is
|
|
|
|
|
mi. FIXME: Should have a better test for this. */
|
2001-07-06 05:53:11 +02:00
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (!part_of_multiple && show_breakpoint_hit_counts && b->hit_count == 0)
|
2000-02-23 01:25:43 +01:00
|
|
|
|
ui_out_field_int (uiout, "times", b->hit_count);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (!part_of_multiple && b->ignore_count)
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
|
|
|
|
annotate_field (8);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
ui_out_text (uiout, "\tignore next ");
|
|
|
|
|
ui_out_field_int (uiout, "ignore", b->ignore_count);
|
|
|
|
|
ui_out_text (uiout, " hits\n");
|
1999-12-14 02:06:04 +01:00
|
|
|
|
}
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (!part_of_multiple && (l = b->commands))
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
struct cleanup *script_chain;
|
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
annotate_field (9);
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
script_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "script");
|
2000-02-03 05:14:45 +01:00
|
|
|
|
print_command_lines (uiout, l, 4);
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
do_cleanups (script_chain);
|
1999-12-14 02:06:04 +01:00
|
|
|
|
}
|
2008-04-24 10:46:19 +02:00
|
|
|
|
|
|
|
|
|
if (ui_out_is_mi_like_p (uiout) && !part_of_multiple)
|
|
|
|
|
{
|
|
|
|
|
if (b->addr_string)
|
|
|
|
|
ui_out_field_string (uiout, "original-location", b->addr_string);
|
|
|
|
|
else if (b->exp_string)
|
|
|
|
|
ui_out_field_string (uiout, "original-location", b->exp_string);
|
|
|
|
|
}
|
|
|
|
|
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
do_cleanups (bkpt_chain);
|
2000-02-03 05:14:45 +01:00
|
|
|
|
do_cleanups (old_chain);
|
1999-12-14 02:06:04 +01:00
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
static void
|
|
|
|
|
print_one_breakpoint (struct breakpoint *b,
|
|
|
|
|
CORE_ADDR *last_addr)
|
|
|
|
|
{
|
|
|
|
|
print_one_breakpoint_location (b, NULL, 0, last_addr);
|
|
|
|
|
|
|
|
|
|
/* If this breakpoint has custom print function,
|
|
|
|
|
it's already printed. Otherwise, print individual
|
|
|
|
|
locations, if any. */
|
|
|
|
|
if (b->ops == NULL || b->ops->print_one == NULL)
|
|
|
|
|
{
|
|
|
|
|
/* If breakpoint has a single location that is
|
|
|
|
|
disabled, we print it as if it had
|
|
|
|
|
several locations, since otherwise it's hard to
|
|
|
|
|
represent "breakpoint enabled, location disabled"
|
2008-01-29 18:52:47 +01:00
|
|
|
|
situation.
|
|
|
|
|
Note that while hardware watchpoints have
|
|
|
|
|
several locations internally, that's no a property
|
|
|
|
|
exposed to user. */
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (b->loc
|
2008-01-29 18:52:47 +01:00
|
|
|
|
&& !is_hardware_watchpoint (b)
|
2007-09-23 09:56:22 +02:00
|
|
|
|
&& (b->loc->next || !b->loc->enabled)
|
2008-01-29 18:52:47 +01:00
|
|
|
|
&& !ui_out_is_mi_like_p (uiout))
|
2007-09-23 09:56:22 +02:00
|
|
|
|
{
|
|
|
|
|
struct bp_location *loc;
|
|
|
|
|
int n = 1;
|
|
|
|
|
for (loc = b->loc; loc; loc = loc->next, ++n)
|
|
|
|
|
print_one_breakpoint_location (b, loc, n, last_addr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
struct captured_breakpoint_query_args
|
|
|
|
|
{
|
|
|
|
|
int bnum;
|
|
|
|
|
};
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
static int
|
2001-09-18 07:00:51 +02:00
|
|
|
|
do_captured_breakpoint_query (struct ui_out *uiout, void *data)
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
|
|
|
|
struct captured_breakpoint_query_args *args = data;
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
1999-12-14 02:06:04 +01:00
|
|
|
|
CORE_ADDR dummy_addr = 0;
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
{
|
|
|
|
|
if (args->bnum == b->number)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
1999-12-14 02:06:04 +01:00
|
|
|
|
print_one_breakpoint (b, &dummy_addr);
|
|
|
|
|
return GDB_RC_OK;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
1999-12-14 02:06:04 +01:00
|
|
|
|
}
|
|
|
|
|
return GDB_RC_NONE;
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
enum gdb_rc
|
2005-01-13 23:08:27 +01:00
|
|
|
|
gdb_breakpoint_query (struct ui_out *uiout, int bnum, char **error_message)
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
|
|
|
|
struct captured_breakpoint_query_args args;
|
|
|
|
|
args.bnum = bnum;
|
|
|
|
|
/* For the moment we don't trust print_one_breakpoint() to not throw
|
|
|
|
|
an error. */
|
2007-04-10 16:53:46 +02:00
|
|
|
|
if (catch_exceptions_with_msg (uiout, do_captured_breakpoint_query, &args,
|
|
|
|
|
error_message, RETURN_MASK_ALL) < 0)
|
|
|
|
|
return GDB_RC_FAIL;
|
|
|
|
|
else
|
|
|
|
|
return GDB_RC_OK;
|
1999-12-14 02:06:04 +01:00
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2001-06-18 20:48:06 +02:00
|
|
|
|
/* Return non-zero if B is user settable (breakpoints, watchpoints,
|
|
|
|
|
catchpoints, et.al.). */
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
user_settable_breakpoint (const struct breakpoint *b)
|
|
|
|
|
{
|
|
|
|
|
return (b->type == bp_breakpoint
|
|
|
|
|
|| b->type == bp_catch_load
|
|
|
|
|
|| b->type == bp_catch_unload
|
|
|
|
|
|| b->type == bp_catch_fork
|
|
|
|
|
|| b->type == bp_catch_vfork
|
|
|
|
|
|| b->type == bp_catch_exec
|
|
|
|
|
|| b->type == bp_hardware_breakpoint
|
|
|
|
|
|| b->type == bp_watchpoint
|
|
|
|
|
|| b->type == bp_read_watchpoint
|
|
|
|
|
|| b->type == bp_access_watchpoint
|
|
|
|
|
|| b->type == bp_hardware_watchpoint);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Print information on user settable breakpoint (watchpoint, etc)
|
|
|
|
|
number BNUM. If BNUM is -1 print all user settable breakpoints.
|
|
|
|
|
If ALLFLAG is non-zero, include non- user settable breakpoints. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
breakpoint_1 (int bnum, int allflag)
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
1999-12-14 02:06:04 +01:00
|
|
|
|
CORE_ADDR last_addr = (CORE_ADDR) -1;
|
2001-06-18 20:48:06 +02:00
|
|
|
|
int nr_printable_breakpoints;
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
struct cleanup *bkpttbl_chain;
|
1999-12-14 02:06:04 +01:00
|
|
|
|
|
2001-06-18 20:48:06 +02:00
|
|
|
|
/* Compute the number of rows in the table. */
|
|
|
|
|
nr_printable_breakpoints = 0;
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (bnum == -1
|
|
|
|
|
|| bnum == b->number)
|
|
|
|
|
{
|
|
|
|
|
if (allflag || user_settable_breakpoint (b))
|
|
|
|
|
nr_printable_breakpoints++;
|
|
|
|
|
}
|
|
|
|
|
|
2000-02-03 05:14:45 +01:00
|
|
|
|
if (addressprint)
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
bkpttbl_chain
|
|
|
|
|
= make_cleanup_ui_out_table_begin_end (uiout, 6, nr_printable_breakpoints,
|
|
|
|
|
"BreakpointTable");
|
2000-02-03 05:14:45 +01:00
|
|
|
|
else
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
bkpttbl_chain
|
|
|
|
|
= make_cleanup_ui_out_table_begin_end (uiout, 5, nr_printable_breakpoints,
|
|
|
|
|
"BreakpointTable");
|
2000-02-03 05:14:45 +01:00
|
|
|
|
|
2001-06-18 20:48:06 +02:00
|
|
|
|
if (nr_printable_breakpoints > 0)
|
2001-06-27 02:09:01 +02:00
|
|
|
|
annotate_breakpoints_headers ();
|
|
|
|
|
if (nr_printable_breakpoints > 0)
|
|
|
|
|
annotate_field (0);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
ui_out_table_header (uiout, 7, ui_left, "number", "Num"); /* 1 */
|
2001-06-27 02:09:01 +02:00
|
|
|
|
if (nr_printable_breakpoints > 0)
|
|
|
|
|
annotate_field (1);
|
|
|
|
|
ui_out_table_header (uiout, 14, ui_left, "type", "Type"); /* 2 */
|
|
|
|
|
if (nr_printable_breakpoints > 0)
|
|
|
|
|
annotate_field (2);
|
|
|
|
|
ui_out_table_header (uiout, 4, ui_left, "disp", "Disp"); /* 3 */
|
|
|
|
|
if (nr_printable_breakpoints > 0)
|
|
|
|
|
annotate_field (3);
|
2008-02-26 09:14:11 +01:00
|
|
|
|
ui_out_table_header (uiout, 3, ui_left, "enabled", "Enb"); /* 4 */
|
2001-06-27 02:09:01 +02:00
|
|
|
|
if (addressprint)
|
2001-06-18 20:48:06 +02:00
|
|
|
|
{
|
2001-06-27 02:09:01 +02:00
|
|
|
|
if (nr_printable_breakpoints > 0)
|
|
|
|
|
annotate_field (4);
|
2007-06-13 19:59:51 +02:00
|
|
|
|
if (gdbarch_addr_bit (current_gdbarch) <= 32)
|
2001-06-21 17:39:54 +02:00
|
|
|
|
ui_out_table_header (uiout, 10, ui_left, "addr", "Address");/* 5 */
|
2001-06-18 20:48:06 +02:00
|
|
|
|
else
|
2001-06-21 17:39:54 +02:00
|
|
|
|
ui_out_table_header (uiout, 18, ui_left, "addr", "Address");/* 5 */
|
2001-06-18 20:48:06 +02:00
|
|
|
|
}
|
2001-06-27 02:09:01 +02:00
|
|
|
|
if (nr_printable_breakpoints > 0)
|
|
|
|
|
annotate_field (5);
|
|
|
|
|
ui_out_table_header (uiout, 40, ui_noalign, "what", "What"); /* 6 */
|
|
|
|
|
ui_out_table_body (uiout);
|
|
|
|
|
if (nr_printable_breakpoints > 0)
|
|
|
|
|
annotate_breakpoints_table ();
|
2001-06-18 20:48:06 +02:00
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (bnum == -1
|
|
|
|
|
|| bnum == b->number)
|
|
|
|
|
{
|
|
|
|
|
/* We only print out user settable breakpoints unless the
|
|
|
|
|
allflag is set. */
|
2001-06-18 20:48:06 +02:00
|
|
|
|
if (allflag || user_settable_breakpoint (b))
|
|
|
|
|
print_one_breakpoint (b, &last_addr);
|
1999-12-14 02:06:04 +01:00
|
|
|
|
}
|
|
|
|
|
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
do_cleanups (bkpttbl_chain);
|
2001-06-19 22:30:11 +02:00
|
|
|
|
|
2001-06-18 20:48:06 +02:00
|
|
|
|
if (nr_printable_breakpoints == 0)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2000-02-03 05:14:45 +01:00
|
|
|
|
if (bnum == -1)
|
|
|
|
|
ui_out_message (uiout, 0, "No breakpoints or watchpoints.\n");
|
|
|
|
|
else
|
|
|
|
|
ui_out_message (uiout, 0, "No breakpoint or watchpoint number %d.\n",
|
|
|
|
|
bnum);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
|
|
|
|
/* Compare against (CORE_ADDR)-1 in case some compiler decides
|
|
|
|
|
that a comparison of an unsigned with -1 is always false. */
|
2007-07-11 00:59:42 +02:00
|
|
|
|
if (last_addr != (CORE_ADDR) -1 && !server_command)
|
1999-12-14 02:06:04 +01:00
|
|
|
|
set_next_address (last_addr);
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
/* FIXME? Should this be moved up so that it is only called when
|
|
|
|
|
there have been breakpoints? */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
annotate_breakpoints_table_end ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
breakpoints_info (char *bnum_exp, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
int bnum = -1;
|
|
|
|
|
|
|
|
|
|
if (bnum_exp)
|
2000-10-30 16:32:51 +01:00
|
|
|
|
bnum = parse_and_eval_long (bnum_exp);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
breakpoint_1 (bnum, 0);
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-26 20:34:20 +02:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
maintenance_info_breakpoints (char *bnum_exp, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
int bnum = -1;
|
|
|
|
|
|
|
|
|
|
if (bnum_exp)
|
2000-10-30 16:32:51 +01:00
|
|
|
|
bnum = parse_and_eval_long (bnum_exp);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
breakpoint_1 (bnum, 1);
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
static int
|
|
|
|
|
breakpoint_has_pc (struct breakpoint *b, CORE_ADDR pc, asection *section)
|
|
|
|
|
{
|
|
|
|
|
struct bp_location *bl = b->loc;
|
|
|
|
|
for (; bl; bl = bl->next)
|
|
|
|
|
{
|
|
|
|
|
if (bl->address == pc
|
|
|
|
|
&& (!overlay_debugging || bl->section == section))
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Print a message describing any breakpoints set at PC. */
|
|
|
|
|
|
|
|
|
|
static void
|
2006-10-19 17:58:25 +02:00
|
|
|
|
describe_other_breakpoints (CORE_ADDR pc, asection *section, int thread)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
int others = 0;
|
|
|
|
|
struct breakpoint *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
2007-09-23 09:56:22 +02:00
|
|
|
|
others += breakpoint_has_pc (b, pc, section);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (others > 0)
|
|
|
|
|
{
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
if (others == 1)
|
|
|
|
|
printf_filtered (_("Note: breakpoint "));
|
|
|
|
|
else /* if (others == ???) */
|
|
|
|
|
printf_filtered (_("Note: breakpoints "));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
ALL_BREAKPOINTS (b)
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (breakpoint_has_pc (b, pc, section))
|
|
|
|
|
{
|
|
|
|
|
others--;
|
|
|
|
|
printf_filtered ("%d", b->number);
|
|
|
|
|
if (b->thread == -1 && thread != -1)
|
|
|
|
|
printf_filtered (" (all threads)");
|
|
|
|
|
else if (b->thread != -1)
|
|
|
|
|
printf_filtered (" (thread %d)", b->thread);
|
|
|
|
|
printf_filtered ("%s%s ",
|
|
|
|
|
((b->enable_state == bp_disabled ||
|
|
|
|
|
b->enable_state == bp_call_disabled)
|
|
|
|
|
? " (disabled)"
|
|
|
|
|
: b->enable_state == bp_permanent
|
|
|
|
|
? " (permanent)"
|
|
|
|
|
: ""),
|
|
|
|
|
(others > 1) ? ","
|
|
|
|
|
: ((others == 1) ? " and" : ""));
|
|
|
|
|
}
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("also set at pc "));
|
* exec.c: #include "arch-utils.h"
(print_section_info): Use gdbarch_from_bfd to get at the
current architecture. Replace current_gdbarch. Fix indention.
Replace deprecated_print_address_numeric by paddress.
* Makefile.in (exec.o) Add dependency to arch-utils.h.
* valprint.c (val_print_string): Replace
deprecated_print_address_numeric.
* tracepoint.c (trace_mention, scope_info): Likewise.
* symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1, print_symbol)
(print_symbol, print_partial_symbols, maintenance_info_psymtabs)
(maintenance_check_symtabs): Likewise.
* symfile.c (list_overlays_command): Likewise.
* stack.c (frame_info, print_block_frame_labels): Likewise.
* printcmd.c (print_address, print_address_demangle)
(address_info): Likewise.
* corefile.c (memory_error): Likewise.
* infcmd.c (jump_command): Likewise.
* breakpoint.c (insert_bp_location, describe_other_breakpoints)
(mention, delete_breakpoint): Likewise.
* c-valprint.c (print_function_pointer_address, c_val_print): Likewise.
* dwarf2read.c (dump_die): Likewise.
* ada-valprint.c (ada_val_print_1): Likewise.
* f-valprint.c (f_val_print): Likewise.
* linux-fork.c (info_forks_command): Likewise.
* m32r-com.c (m32r_load_section, m32r_load)
(m32r_upload_command): Likewise.
* ui-out.c (ui_out_field_core_addr): Remove unnecessary comment.
2008-01-11 14:34:15 +01:00
|
|
|
|
fputs_filtered (paddress (pc), gdb_stdout);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
printf_filtered (".\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Set the default place to put a breakpoint
|
|
|
|
|
for the `break' command with no arguments. */
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
set_default_breakpoint (int valid, CORE_ADDR addr, struct symtab *symtab,
|
|
|
|
|
int line)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
default_breakpoint_valid = valid;
|
|
|
|
|
default_breakpoint_address = addr;
|
|
|
|
|
default_breakpoint_symtab = symtab;
|
|
|
|
|
default_breakpoint_line = line;
|
|
|
|
|
}
|
|
|
|
|
|
2001-05-23 02:52:44 +02:00
|
|
|
|
/* Return true iff it is meaningful to use the address member of
|
|
|
|
|
BPT. For some breakpoint types, the address member is irrelevant
|
|
|
|
|
and it makes no sense to attempt to compare it to other addresses
|
|
|
|
|
(or use it for any other purpose either).
|
|
|
|
|
|
|
|
|
|
More specifically, each of the following breakpoint types will always
|
|
|
|
|
have a zero valued address and we don't want check_duplicates() to mark
|
|
|
|
|
breakpoints of any of these types to be a duplicate of an actual
|
|
|
|
|
breakpoint at address zero:
|
|
|
|
|
|
|
|
|
|
bp_watchpoint
|
|
|
|
|
bp_hardware_watchpoint
|
|
|
|
|
bp_read_watchpoint
|
|
|
|
|
bp_access_watchpoint
|
|
|
|
|
bp_catch_exec
|
|
|
|
|
bp_longjmp_resume
|
|
|
|
|
bp_catch_fork
|
|
|
|
|
bp_catch_vork */
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
breakpoint_address_is_meaningful (struct breakpoint *bpt)
|
|
|
|
|
{
|
|
|
|
|
enum bptype type = bpt->type;
|
|
|
|
|
|
|
|
|
|
return (type != bp_watchpoint
|
|
|
|
|
&& type != bp_hardware_watchpoint
|
|
|
|
|
&& type != bp_read_watchpoint
|
|
|
|
|
&& type != bp_access_watchpoint
|
|
|
|
|
&& type != bp_catch_exec
|
|
|
|
|
&& type != bp_longjmp_resume
|
|
|
|
|
&& type != bp_catch_fork
|
|
|
|
|
&& type != bp_catch_vfork);
|
|
|
|
|
}
|
|
|
|
|
|
2001-05-06 02:52:07 +02:00
|
|
|
|
/* Rescan breakpoints at the same address and section as BPT,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
marking the first one as "first" and any others as "duplicates".
|
1999-09-22 05:28:34 +02:00
|
|
|
|
This is so that the bpt instruction is only inserted once.
|
2001-05-06 02:52:07 +02:00
|
|
|
|
If we have a permanent breakpoint at the same place as BPT, make
|
|
|
|
|
that one the official one, and the rest as duplicates. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
static void
|
2007-09-23 09:56:22 +02:00
|
|
|
|
check_duplicates_for (CORE_ADDR address, asection *section)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-11-06 19:27:34 +01:00
|
|
|
|
struct bp_location *b;
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
int count = 0;
|
2003-11-06 19:27:34 +01:00
|
|
|
|
struct bp_location *perm_bp = 0;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-11-06 19:27:34 +01:00
|
|
|
|
ALL_BP_LOCATIONS (b)
|
|
|
|
|
if (b->owner->enable_state != bp_disabled
|
|
|
|
|
&& b->owner->enable_state != bp_call_disabled
|
2007-09-23 09:56:22 +02:00
|
|
|
|
&& b->enabled
|
|
|
|
|
&& !b->shlib_disabled
|
2003-11-06 19:27:34 +01:00
|
|
|
|
&& b->address == address /* address / overlay match */
|
|
|
|
|
&& (!overlay_debugging || b->section == section)
|
|
|
|
|
&& breakpoint_address_is_meaningful (b->owner))
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
1999-09-22 05:28:34 +02:00
|
|
|
|
/* Have we found a permanent breakpoint? */
|
2003-11-06 19:27:34 +01:00
|
|
|
|
if (b->owner->enable_state == bp_permanent)
|
1999-09-22 05:28:34 +02:00
|
|
|
|
{
|
|
|
|
|
perm_bp = b;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
count++;
|
2003-11-06 19:27:34 +01:00
|
|
|
|
b->duplicate = count > 1;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
1999-09-22 05:28:34 +02:00
|
|
|
|
|
|
|
|
|
/* If we found a permanent breakpoint at this address, go over the
|
|
|
|
|
list again and declare all the other breakpoints there to be the
|
|
|
|
|
duplicates. */
|
|
|
|
|
if (perm_bp)
|
|
|
|
|
{
|
2003-11-06 19:27:34 +01:00
|
|
|
|
perm_bp->duplicate = 0;
|
1999-09-22 05:28:34 +02:00
|
|
|
|
|
|
|
|
|
/* Permanent breakpoint should always be inserted. */
|
2003-11-06 19:27:34 +01:00
|
|
|
|
if (! perm_bp->inserted)
|
2001-02-08 07:03:54 +01:00
|
|
|
|
internal_error (__FILE__, __LINE__,
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
_("allegedly permanent breakpoint is not "
|
|
|
|
|
"actually inserted"));
|
1999-09-22 05:28:34 +02:00
|
|
|
|
|
2003-11-06 19:27:34 +01:00
|
|
|
|
ALL_BP_LOCATIONS (b)
|
1999-09-22 05:28:34 +02:00
|
|
|
|
if (b != perm_bp)
|
|
|
|
|
{
|
2003-11-06 19:27:34 +01:00
|
|
|
|
if (b->owner->enable_state != bp_disabled
|
|
|
|
|
&& b->owner->enable_state != bp_call_disabled
|
2007-09-23 09:56:22 +02:00
|
|
|
|
&& b->enabled && !b->shlib_disabled
|
2003-11-06 19:27:34 +01:00
|
|
|
|
&& b->address == address /* address / overlay match */
|
|
|
|
|
&& (!overlay_debugging || b->section == section)
|
|
|
|
|
&& breakpoint_address_is_meaningful (b->owner))
|
|
|
|
|
{
|
|
|
|
|
if (b->inserted)
|
|
|
|
|
internal_error (__FILE__, __LINE__,
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
_("another breakpoint was inserted on top of "
|
|
|
|
|
"a permanent breakpoint"));
|
2003-11-06 19:27:34 +01:00
|
|
|
|
|
|
|
|
|
b->duplicate = 1;
|
|
|
|
|
}
|
1999-09-22 05:28:34 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
static void
|
|
|
|
|
check_duplicates (struct breakpoint *bpt)
|
|
|
|
|
{
|
|
|
|
|
struct bp_location *bl = bpt->loc;
|
|
|
|
|
|
|
|
|
|
if (! breakpoint_address_is_meaningful (bpt))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
for (; bl; bl = bl->next)
|
|
|
|
|
check_duplicates_for (bl->address, bl->section);
|
|
|
|
|
}
|
|
|
|
|
|
2003-10-14 01:53:20 +02:00
|
|
|
|
static void
|
|
|
|
|
breakpoint_adjustment_warning (CORE_ADDR from_addr, CORE_ADDR to_addr,
|
|
|
|
|
int bnum, int have_bnum)
|
|
|
|
|
{
|
|
|
|
|
char astr1[40];
|
|
|
|
|
char astr2[40];
|
|
|
|
|
|
2004-09-11 12:24:53 +02:00
|
|
|
|
strcpy (astr1, hex_string_custom ((unsigned long) from_addr, 8));
|
|
|
|
|
strcpy (astr2, hex_string_custom ((unsigned long) to_addr, 8));
|
2003-10-14 01:53:20 +02:00
|
|
|
|
if (have_bnum)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("Breakpoint %d address previously adjusted from %s to %s."),
|
2003-10-14 01:53:20 +02:00
|
|
|
|
bnum, astr1, astr2);
|
|
|
|
|
else
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("Breakpoint address adjusted from %s to %s."), astr1, astr2);
|
2003-10-14 01:53:20 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Adjust a breakpoint's address to account for architectural constraints
|
|
|
|
|
on breakpoint placement. Return the adjusted address. Note: Very
|
|
|
|
|
few targets require this kind of adjustment. For most targets,
|
|
|
|
|
this function is simply the identity function. */
|
|
|
|
|
|
|
|
|
|
static CORE_ADDR
|
2004-03-19 21:49:43 +01:00
|
|
|
|
adjust_breakpoint_address (CORE_ADDR bpaddr, enum bptype bptype)
|
2003-10-14 01:53:20 +02:00
|
|
|
|
{
|
|
|
|
|
if (!gdbarch_adjust_breakpoint_address_p (current_gdbarch))
|
|
|
|
|
{
|
|
|
|
|
/* Very few targets need any kind of breakpoint adjustment. */
|
|
|
|
|
return bpaddr;
|
|
|
|
|
}
|
2004-03-19 21:49:43 +01:00
|
|
|
|
else if (bptype == bp_watchpoint
|
|
|
|
|
|| bptype == bp_hardware_watchpoint
|
|
|
|
|
|| bptype == bp_read_watchpoint
|
|
|
|
|
|| bptype == bp_access_watchpoint
|
|
|
|
|
|| bptype == bp_catch_fork
|
|
|
|
|
|| bptype == bp_catch_vfork
|
|
|
|
|
|| bptype == bp_catch_exec)
|
|
|
|
|
{
|
|
|
|
|
/* Watchpoints and the various bp_catch_* eventpoints should not
|
|
|
|
|
have their addresses modified. */
|
|
|
|
|
return bpaddr;
|
|
|
|
|
}
|
2003-10-14 01:53:20 +02:00
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
CORE_ADDR adjusted_bpaddr;
|
|
|
|
|
|
|
|
|
|
/* Some targets have architectural constraints on the placement
|
|
|
|
|
of breakpoint instructions. Obtain the adjusted address. */
|
|
|
|
|
adjusted_bpaddr = gdbarch_adjust_breakpoint_address (current_gdbarch,
|
|
|
|
|
bpaddr);
|
|
|
|
|
|
|
|
|
|
/* An adjusted breakpoint address can significantly alter
|
|
|
|
|
a user's expectations. Print a warning if an adjustment
|
|
|
|
|
is required. */
|
|
|
|
|
if (adjusted_bpaddr != bpaddr)
|
|
|
|
|
breakpoint_adjustment_warning (bpaddr, adjusted_bpaddr, 0, 0);
|
|
|
|
|
|
|
|
|
|
return adjusted_bpaddr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2003-11-06 18:26:18 +01:00
|
|
|
|
/* Allocate a struct bp_location. */
|
|
|
|
|
|
2003-11-06 19:35:05 +01:00
|
|
|
|
static struct bp_location *
|
2003-11-06 19:20:52 +01:00
|
|
|
|
allocate_bp_location (struct breakpoint *bpt, enum bptype bp_type)
|
2003-11-06 18:26:18 +01:00
|
|
|
|
{
|
|
|
|
|
struct bp_location *loc, *loc_p;
|
|
|
|
|
|
|
|
|
|
loc = xmalloc (sizeof (struct bp_location));
|
|
|
|
|
memset (loc, 0, sizeof (*loc));
|
|
|
|
|
|
2003-11-06 19:20:52 +01:00
|
|
|
|
loc->owner = bpt;
|
2007-09-22 21:06:59 +02:00
|
|
|
|
loc->cond = NULL;
|
2007-09-23 09:56:22 +02:00
|
|
|
|
loc->shlib_disabled = 0;
|
|
|
|
|
loc->enabled = 1;
|
2003-11-06 19:20:52 +01:00
|
|
|
|
|
|
|
|
|
switch (bp_type)
|
|
|
|
|
{
|
|
|
|
|
case bp_breakpoint:
|
|
|
|
|
case bp_until:
|
|
|
|
|
case bp_finish:
|
|
|
|
|
case bp_longjmp:
|
|
|
|
|
case bp_longjmp_resume:
|
|
|
|
|
case bp_step_resume:
|
|
|
|
|
case bp_watchpoint_scope:
|
|
|
|
|
case bp_call_dummy:
|
|
|
|
|
case bp_shlib_event:
|
|
|
|
|
case bp_thread_event:
|
|
|
|
|
case bp_overlay_event:
|
|
|
|
|
case bp_catch_load:
|
|
|
|
|
case bp_catch_unload:
|
|
|
|
|
loc->loc_type = bp_loc_software_breakpoint;
|
|
|
|
|
break;
|
|
|
|
|
case bp_hardware_breakpoint:
|
|
|
|
|
loc->loc_type = bp_loc_hardware_breakpoint;
|
|
|
|
|
break;
|
|
|
|
|
case bp_hardware_watchpoint:
|
|
|
|
|
case bp_read_watchpoint:
|
|
|
|
|
case bp_access_watchpoint:
|
|
|
|
|
loc->loc_type = bp_loc_hardware_watchpoint;
|
|
|
|
|
break;
|
|
|
|
|
case bp_watchpoint:
|
|
|
|
|
case bp_catch_fork:
|
|
|
|
|
case bp_catch_vfork:
|
|
|
|
|
case bp_catch_exec:
|
|
|
|
|
loc->loc_type = bp_loc_other;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
internal_error (__FILE__, __LINE__, _("unknown breakpoint type"));
|
2003-11-06 19:20:52 +01:00
|
|
|
|
}
|
|
|
|
|
|
2003-11-06 18:26:18 +01:00
|
|
|
|
return loc;
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-22 21:33:32 +02:00
|
|
|
|
static void free_bp_location (struct bp_location *loc)
|
|
|
|
|
{
|
|
|
|
|
if (loc->cond)
|
|
|
|
|
xfree (loc->cond);
|
2008-04-24 12:21:45 +02:00
|
|
|
|
|
|
|
|
|
if (loc->function_name)
|
|
|
|
|
xfree (loc->function_name);
|
|
|
|
|
|
2007-09-22 21:33:32 +02:00
|
|
|
|
xfree (loc);
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
/* Helper to set_raw_breakpoint below. Creates a breakpoint
|
|
|
|
|
that has type BPTYPE and has no locations as yet. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2007-11-05 19:24:29 +01:00
|
|
|
|
static struct breakpoint *
|
2007-09-23 09:56:22 +02:00
|
|
|
|
set_raw_breakpoint_without_location (enum bptype bptype)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b, *b1;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
b = (struct breakpoint *) xmalloc (sizeof (struct breakpoint));
|
|
|
|
|
memset (b, 0, sizeof (*b));
|
2007-05-03 19:42:25 +02:00
|
|
|
|
|
2001-05-11 21:46:35 +02:00
|
|
|
|
b->type = bptype;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
b->language = current_language->la_language;
|
|
|
|
|
b->input_radix = input_radix;
|
|
|
|
|
b->thread = -1;
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->enable_state = bp_enabled;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
b->next = 0;
|
|
|
|
|
b->silent = 0;
|
|
|
|
|
b->ignore_count = 0;
|
|
|
|
|
b->commands = NULL;
|
2002-12-11 23:34:47 +01:00
|
|
|
|
b->frame_id = null_frame_id;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
b->dll_pathname = NULL;
|
|
|
|
|
b->triggered_dll_pathname = NULL;
|
|
|
|
|
b->forked_inferior_pid = 0;
|
|
|
|
|
b->exec_pathname = NULL;
|
2003-04-27 03:11:10 +02:00
|
|
|
|
b->ops = NULL;
|
2007-09-23 09:56:22 +02:00
|
|
|
|
b->condition_not_parsed = 0;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Add this breakpoint to the end of the chain
|
|
|
|
|
so that a list of breakpoints will come out in order
|
|
|
|
|
of increasing numbers. */
|
|
|
|
|
|
|
|
|
|
b1 = breakpoint_chain;
|
|
|
|
|
if (b1 == 0)
|
|
|
|
|
breakpoint_chain = b;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
while (b1->next)
|
|
|
|
|
b1 = b1->next;
|
|
|
|
|
b1->next = b;
|
|
|
|
|
}
|
2007-09-23 09:56:22 +02:00
|
|
|
|
return b;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Initialize loc->function_name. */
|
|
|
|
|
static void
|
|
|
|
|
set_breakpoint_location_function (struct bp_location *loc)
|
|
|
|
|
{
|
|
|
|
|
if (loc->owner->type == bp_breakpoint
|
|
|
|
|
|| loc->owner->type == bp_hardware_breakpoint)
|
|
|
|
|
{
|
|
|
|
|
find_pc_partial_function (loc->address, &(loc->function_name),
|
|
|
|
|
NULL, NULL);
|
|
|
|
|
if (loc->function_name)
|
|
|
|
|
loc->function_name = xstrdup (loc->function_name);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* set_raw_breakpoint is a low level routine for allocating and
|
|
|
|
|
partially initializing a breakpoint of type BPTYPE. The newly
|
|
|
|
|
created breakpoint's address, section, source file name, and line
|
|
|
|
|
number are provided by SAL. The newly created and partially
|
|
|
|
|
initialized breakpoint is added to the breakpoint chain and
|
|
|
|
|
is also returned as the value of this function.
|
|
|
|
|
|
|
|
|
|
It is expected that the caller will complete the initialization of
|
|
|
|
|
the newly created breakpoint struct as well as output any status
|
|
|
|
|
information regarding the creation of a new breakpoint. In
|
|
|
|
|
particular, set_raw_breakpoint does NOT set the breakpoint
|
|
|
|
|
number! Care should be taken to not allow an error to occur
|
|
|
|
|
prior to completing the initialization of the breakpoint. If this
|
|
|
|
|
should happen, a bogus breakpoint will be left on the chain. */
|
|
|
|
|
|
|
|
|
|
struct breakpoint *
|
|
|
|
|
set_raw_breakpoint (struct symtab_and_line sal, enum bptype bptype)
|
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b = set_raw_breakpoint_without_location (bptype);
|
|
|
|
|
CORE_ADDR adjusted_address;
|
|
|
|
|
|
|
|
|
|
/* Adjust the breakpoint's address prior to allocating a location.
|
|
|
|
|
Once we call allocate_bp_location(), that mostly uninitialized
|
|
|
|
|
location will be placed on the location chain. Adjustment of the
|
* breakpoint.h (breakpoint_restore_shadows): New
declaration.
* breakpoint.c (breakpoint_restore_shadows): New.
(read_memory_nobpt): Delete.
* gdbcore.h (read_memory_nobpt): Delete declaration.
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
(make_show_memory_beakpoints_cleanup): New.
(show_memory_breakpoints): New.
* target.h (make_show_memory_beakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
* alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
2008-03-13 13:22:14 +01:00
|
|
|
|
breakpoint may cause target_read_memory() to be called and we do
|
2007-09-23 09:56:22 +02:00
|
|
|
|
not want its scan of the location chain to find a breakpoint and
|
|
|
|
|
location that's only been partially initialized. */
|
|
|
|
|
adjusted_address = adjust_breakpoint_address (sal.pc, bptype);
|
|
|
|
|
|
|
|
|
|
b->loc = allocate_bp_location (b, bptype);
|
|
|
|
|
b->loc->requested_address = sal.pc;
|
|
|
|
|
b->loc->address = adjusted_address;
|
|
|
|
|
|
|
|
|
|
if (sal.symtab == NULL)
|
|
|
|
|
b->source_file = NULL;
|
|
|
|
|
else
|
|
|
|
|
b->source_file = savestring (sal.symtab->filename,
|
|
|
|
|
strlen (sal.symtab->filename));
|
|
|
|
|
b->loc->section = sal.section;
|
|
|
|
|
b->line_number = sal.line;
|
|
|
|
|
|
|
|
|
|
set_breakpoint_location_function (b->loc);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
breakpoints_changed ();
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
}
|
|
|
|
|
|
1999-09-22 05:28:34 +02:00
|
|
|
|
|
|
|
|
|
/* Note that the breakpoint object B describes a permanent breakpoint
|
|
|
|
|
instruction, hard-wired into the inferior's code. */
|
|
|
|
|
void
|
|
|
|
|
make_breakpoint_permanent (struct breakpoint *b)
|
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
struct bp_location *bl;
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->enable_state = bp_permanent;
|
1999-09-22 05:28:34 +02:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
/* By definition, permanent breakpoints are already present in the code.
|
|
|
|
|
Mark all locations as inserted. For now, make_breakpoint_permanent
|
|
|
|
|
is called in just one place, so it's hard to say if it's reasonable
|
|
|
|
|
to have permanent breakpoint with multiple locations or not,
|
|
|
|
|
but it's easy to implmement. */
|
|
|
|
|
for (bl = b->loc; bl; bl = bl->next)
|
|
|
|
|
bl->inserted = 1;
|
1999-09-22 05:28:34 +02:00
|
|
|
|
}
|
|
|
|
|
|
2002-02-06 19:31:07 +01:00
|
|
|
|
static struct breakpoint *
|
|
|
|
|
create_internal_breakpoint (CORE_ADDR address, enum bptype type)
|
|
|
|
|
{
|
|
|
|
|
static int internal_breakpoint_number = -1;
|
|
|
|
|
struct symtab_and_line sal;
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
|
2002-10-24 23:02:53 +02:00
|
|
|
|
init_sal (&sal); /* initialize to zeroes */
|
2002-02-06 19:31:07 +01:00
|
|
|
|
|
|
|
|
|
sal.pc = address;
|
|
|
|
|
sal.section = find_pc_overlay (sal.pc);
|
|
|
|
|
|
|
|
|
|
b = set_raw_breakpoint (sal, type);
|
|
|
|
|
b->number = internal_breakpoint_number--;
|
|
|
|
|
b->disposition = disp_donttouch;
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
create_longjmp_breakpoint (char *func_name)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b;
|
2002-02-06 19:31:07 +01:00
|
|
|
|
struct minimal_symbol *m;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2002-02-06 19:31:07 +01:00
|
|
|
|
if (func_name == NULL)
|
|
|
|
|
b = create_internal_breakpoint (0, bp_longjmp_resume);
|
|
|
|
|
else
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-10-22 00:56:39 +02:00
|
|
|
|
if ((m = lookup_minimal_symbol_text (func_name, NULL)) == NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return;
|
2002-02-06 19:31:07 +01:00
|
|
|
|
|
|
|
|
|
b = create_internal_breakpoint (SYMBOL_VALUE_ADDRESS (m), bp_longjmp);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->enable_state = bp_disabled;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
b->silent = 1;
|
|
|
|
|
if (func_name)
|
2001-01-31 02:24:03 +01:00
|
|
|
|
b->addr_string = xstrdup (func_name);
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
1999-08-24 00:40:00 +02:00
|
|
|
|
/* Call this routine when stepping and nexting to enable a breakpoint
|
|
|
|
|
if we do a longjmp(). When we hit that breakpoint, call
|
1999-04-16 03:35:26 +02:00
|
|
|
|
set_longjmp_resume_breakpoint() to figure out where we are going. */
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
enable_longjmp_breakpoint (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->type == bp_longjmp)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->enable_state = bp_enabled;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
disable_longjmp_breakpoint (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (b->type == bp_longjmp
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|| b->type == bp_longjmp_resume)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->enable_state = bp_disabled;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2002-02-06 19:31:07 +01:00
|
|
|
|
static void
|
|
|
|
|
create_overlay_event_breakpoint (char *func_name)
|
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
struct minimal_symbol *m;
|
|
|
|
|
|
2003-10-22 00:56:39 +02:00
|
|
|
|
if ((m = lookup_minimal_symbol_text (func_name, NULL)) == NULL)
|
2002-02-06 19:31:07 +01:00
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
b = create_internal_breakpoint (SYMBOL_VALUE_ADDRESS (m),
|
|
|
|
|
bp_overlay_event);
|
|
|
|
|
b->addr_string = xstrdup (func_name);
|
|
|
|
|
|
|
|
|
|
if (overlay_debugging == ovly_auto)
|
2002-04-05 04:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
b->enable_state = bp_enabled;
|
|
|
|
|
overlay_events_enabled = 1;
|
|
|
|
|
}
|
2002-02-06 19:31:07 +01:00
|
|
|
|
else
|
2002-04-05 04:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
b->enable_state = bp_disabled;
|
|
|
|
|
overlay_events_enabled = 0;
|
|
|
|
|
}
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
2002-02-06 19:31:07 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
enable_overlay_breakpoints (void)
|
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
2002-02-06 19:31:07 +01:00
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->type == bp_overlay_event)
|
|
|
|
|
{
|
|
|
|
|
b->enable_state = bp_enabled;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
2002-04-05 04:35:26 +02:00
|
|
|
|
overlay_events_enabled = 1;
|
2002-02-06 19:31:07 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
disable_overlay_breakpoints (void)
|
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
2002-02-06 19:31:07 +01:00
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->type == bp_overlay_event)
|
|
|
|
|
{
|
|
|
|
|
b->enable_state = bp_disabled;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
2002-04-05 04:35:26 +02:00
|
|
|
|
overlay_events_enabled = 0;
|
2002-02-06 19:31:07 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
struct breakpoint *
|
2000-07-30 03:48:28 +02:00
|
|
|
|
create_thread_event_breakpoint (CORE_ADDR address)
|
1999-12-14 02:06:04 +01:00
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
|
2002-02-06 19:31:07 +01:00
|
|
|
|
b = create_internal_breakpoint (address, bp_thread_event);
|
1999-12-14 02:06:04 +01:00
|
|
|
|
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->enable_state = bp_enabled;
|
1999-12-14 02:06:04 +01:00
|
|
|
|
/* addr_string has to be used or breakpoint_re_set will delete me. */
|
2004-06-29 01:59:29 +02:00
|
|
|
|
b->addr_string = xstrprintf ("*0x%s", paddr (b->loc->address));
|
1999-12-14 02:06:04 +01:00
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list_nothrow ();
|
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
return b;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
remove_thread_event_breakpoints (void)
|
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b, *temp;
|
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS_SAFE (b, temp)
|
|
|
|
|
if (b->type == bp_thread_event)
|
|
|
|
|
delete_breakpoint (b);
|
|
|
|
|
}
|
|
|
|
|
|
2004-02-02 22:10:49 +01:00
|
|
|
|
struct captured_parse_breakpoint_args
|
|
|
|
|
{
|
|
|
|
|
char **arg_p;
|
|
|
|
|
struct symtabs_and_lines *sals_p;
|
|
|
|
|
char ***addr_string_p;
|
|
|
|
|
int *not_found_ptr;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct lang_and_radix
|
|
|
|
|
{
|
|
|
|
|
enum language lang;
|
|
|
|
|
int radix;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2004-02-03 23:47:40 +01:00
|
|
|
|
void
|
|
|
|
|
remove_solib_event_breakpoints (void)
|
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b, *temp;
|
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS_SAFE (b, temp)
|
|
|
|
|
if (b->type == bp_shlib_event)
|
|
|
|
|
delete_breakpoint (b);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct breakpoint *
|
|
|
|
|
create_solib_event_breakpoint (CORE_ADDR address)
|
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
|
|
|
|
|
b = create_internal_breakpoint (address, bp_shlib_event);
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list_nothrow ();
|
2004-02-03 23:47:40 +01:00
|
|
|
|
return b;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Disable any breakpoints that are on code in shared libraries. Only
|
|
|
|
|
apply to enabled breakpoints, disabled ones can just stay disabled. */
|
|
|
|
|
|
|
|
|
|
void
|
2007-08-14 13:09:45 +02:00
|
|
|
|
disable_breakpoints_in_shlibs (void)
|
2004-02-03 23:47:40 +01:00
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
struct bp_location *loc;
|
2004-02-03 23:47:40 +01:00
|
|
|
|
int disabled_shlib_breaks = 0;
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
ALL_BP_LOCATIONS (loc)
|
2004-02-03 23:47:40 +01:00
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
struct breakpoint *b = loc->owner;
|
|
|
|
|
/* We apply the check to all breakpoints, including disabled
|
|
|
|
|
for those with loc->duplicate set. This is so that when breakpoint
|
|
|
|
|
becomes enabled, or the duplicate is removed, gdb will try to insert
|
|
|
|
|
all breakpoints. If we don't set shlib_disabled here, we'll try
|
|
|
|
|
to insert those breakpoints and fail. */
|
* solib.h (CLEAR_SOLIB, SOLIB_ADD)
(SOLIB_CREATE_INFERIOR_HOOK, SOLIB_REMOVE_INFERIOR_HOOK)
(SOLIB_IN_DYNAMIC_LINKER, SOLIB_RESTART)
(DISABLE_UNSETTABLE_BREAK, PC_SOLIB)
(IN_SOLIB_DYNSYM_RESOLVE_CODE): Remove defines and orphaned
comments.
* breakpoint.c: Include "solib.h".
(insert_bp_location) [!DISABLE_UNSETTABLE_BREAK]: Call
solib_address.
(remove_solib_event_breakpoints, create_solib_event_breakpoint)
(disable_breakpoints_in_shlibs)
(disable_breakpoints_in_unloaded_shlib)
(re_enable_breakpoints_in_shlibs): Compile if SOLIB_ADD isn't
defined. If PC_SOLIB isn't defined, call solib_address.
(_initialize_breakpoint): Unconditionally install observer.
* corelow.c: Include "solib.h".
[SOLIB_ADD] (solib_add_stub): Remove prototype.
(core_close) [!CLEAR_SOLIB]: Call clear_solib.
(solib_add_stub) [!SOLIB_ADD] Call solib_add.
(core_open): Unconditionally call solib_add_stub.
* fork-child.c: Include "solib.h".
(fork_inferior) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
* infcmd.c: Include "solib.h".
(attach_command) [!SOLIB_ADD]: Call shlib_rescan. Unconditionally
call re_enable_breakpoints_in_shlibs.
* infrun.c: Include "solib.h".
(SOLIB_IN_SYNSYM_RESOLVE_CODE): Don't define if not already
defined.
(stop_on_solib_events, show_stop_on_solib_events): Include
unconditionally.
(follow_exec) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
(handle_inferior_event) [!SOLIB_ADD]: Call shlib_add.
[!IN_SOLIB_DYNSYM_RESOLVE_CODE]: Call in_solib_dynsym_resolve_code.
(_initialize_infrun): Unconditionally add "stop_on_solib-events"
command.
* remote.c: Include "solib.h".
(remote_open_1): Unconditionally call no_shared_libraries.
[!SOLIB_CREATE_INFERIOR_HOOK] Call solib_create_inferior_hook.
* stack.c: Include "solib.h".
(print_frame) [!PC_SOLIB] Call shlib_for_pc.
* xcoffsolib.c (no_shared_libraries): Remove function.
* Makefile.in (SFILES): Add solib.c.
(ALLDEPFILES): Remove solib.c.
(COMMON_OBS): Add solib.o.
(breakpoint.o, corelow.o, fork-chiled.o, infcmd.o, infrun.o)
(remote.o, stack.o): Update dependencies.
2005-05-12 22:21:18 +02:00
|
|
|
|
if (((b->type == bp_breakpoint) || (b->type == bp_hardware_breakpoint))
|
2007-09-23 09:56:22 +02:00
|
|
|
|
&& !loc->shlib_disabled
|
* solib.h (CLEAR_SOLIB, SOLIB_ADD)
(SOLIB_CREATE_INFERIOR_HOOK, SOLIB_REMOVE_INFERIOR_HOOK)
(SOLIB_IN_DYNAMIC_LINKER, SOLIB_RESTART)
(DISABLE_UNSETTABLE_BREAK, PC_SOLIB)
(IN_SOLIB_DYNSYM_RESOLVE_CODE): Remove defines and orphaned
comments.
* breakpoint.c: Include "solib.h".
(insert_bp_location) [!DISABLE_UNSETTABLE_BREAK]: Call
solib_address.
(remove_solib_event_breakpoints, create_solib_event_breakpoint)
(disable_breakpoints_in_shlibs)
(disable_breakpoints_in_unloaded_shlib)
(re_enable_breakpoints_in_shlibs): Compile if SOLIB_ADD isn't
defined. If PC_SOLIB isn't defined, call solib_address.
(_initialize_breakpoint): Unconditionally install observer.
* corelow.c: Include "solib.h".
[SOLIB_ADD] (solib_add_stub): Remove prototype.
(core_close) [!CLEAR_SOLIB]: Call clear_solib.
(solib_add_stub) [!SOLIB_ADD] Call solib_add.
(core_open): Unconditionally call solib_add_stub.
* fork-child.c: Include "solib.h".
(fork_inferior) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
* infcmd.c: Include "solib.h".
(attach_command) [!SOLIB_ADD]: Call shlib_rescan. Unconditionally
call re_enable_breakpoints_in_shlibs.
* infrun.c: Include "solib.h".
(SOLIB_IN_SYNSYM_RESOLVE_CODE): Don't define if not already
defined.
(stop_on_solib_events, show_stop_on_solib_events): Include
unconditionally.
(follow_exec) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
(handle_inferior_event) [!SOLIB_ADD]: Call shlib_add.
[!IN_SOLIB_DYNSYM_RESOLVE_CODE]: Call in_solib_dynsym_resolve_code.
(_initialize_infrun): Unconditionally add "stop_on_solib-events"
command.
* remote.c: Include "solib.h".
(remote_open_1): Unconditionally call no_shared_libraries.
[!SOLIB_CREATE_INFERIOR_HOOK] Call solib_create_inferior_hook.
* stack.c: Include "solib.h".
(print_frame) [!PC_SOLIB] Call shlib_for_pc.
* xcoffsolib.c (no_shared_libraries): Remove function.
* Makefile.in (SFILES): Add solib.c.
(ALLDEPFILES): Remove solib.c.
(COMMON_OBS): Add solib.o.
(breakpoint.o, corelow.o, fork-chiled.o, infcmd.o, infrun.o)
(remote.o, stack.o): Update dependencies.
2005-05-12 22:21:18 +02:00
|
|
|
|
#ifdef PC_SOLIB
|
2007-09-23 09:56:22 +02:00
|
|
|
|
&& PC_SOLIB (loc->address)
|
* solib.h (CLEAR_SOLIB, SOLIB_ADD)
(SOLIB_CREATE_INFERIOR_HOOK, SOLIB_REMOVE_INFERIOR_HOOK)
(SOLIB_IN_DYNAMIC_LINKER, SOLIB_RESTART)
(DISABLE_UNSETTABLE_BREAK, PC_SOLIB)
(IN_SOLIB_DYNSYM_RESOLVE_CODE): Remove defines and orphaned
comments.
* breakpoint.c: Include "solib.h".
(insert_bp_location) [!DISABLE_UNSETTABLE_BREAK]: Call
solib_address.
(remove_solib_event_breakpoints, create_solib_event_breakpoint)
(disable_breakpoints_in_shlibs)
(disable_breakpoints_in_unloaded_shlib)
(re_enable_breakpoints_in_shlibs): Compile if SOLIB_ADD isn't
defined. If PC_SOLIB isn't defined, call solib_address.
(_initialize_breakpoint): Unconditionally install observer.
* corelow.c: Include "solib.h".
[SOLIB_ADD] (solib_add_stub): Remove prototype.
(core_close) [!CLEAR_SOLIB]: Call clear_solib.
(solib_add_stub) [!SOLIB_ADD] Call solib_add.
(core_open): Unconditionally call solib_add_stub.
* fork-child.c: Include "solib.h".
(fork_inferior) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
* infcmd.c: Include "solib.h".
(attach_command) [!SOLIB_ADD]: Call shlib_rescan. Unconditionally
call re_enable_breakpoints_in_shlibs.
* infrun.c: Include "solib.h".
(SOLIB_IN_SYNSYM_RESOLVE_CODE): Don't define if not already
defined.
(stop_on_solib_events, show_stop_on_solib_events): Include
unconditionally.
(follow_exec) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
(handle_inferior_event) [!SOLIB_ADD]: Call shlib_add.
[!IN_SOLIB_DYNSYM_RESOLVE_CODE]: Call in_solib_dynsym_resolve_code.
(_initialize_infrun): Unconditionally add "stop_on_solib-events"
command.
* remote.c: Include "solib.h".
(remote_open_1): Unconditionally call no_shared_libraries.
[!SOLIB_CREATE_INFERIOR_HOOK] Call solib_create_inferior_hook.
* stack.c: Include "solib.h".
(print_frame) [!PC_SOLIB] Call shlib_for_pc.
* xcoffsolib.c (no_shared_libraries): Remove function.
* Makefile.in (SFILES): Add solib.c.
(ALLDEPFILES): Remove solib.c.
(COMMON_OBS): Add solib.o.
(breakpoint.o, corelow.o, fork-chiled.o, infcmd.o, infrun.o)
(remote.o, stack.o): Update dependencies.
2005-05-12 22:21:18 +02:00
|
|
|
|
#else
|
2007-09-23 09:56:22 +02:00
|
|
|
|
&& solib_address (loc->address)
|
* solib.h (CLEAR_SOLIB, SOLIB_ADD)
(SOLIB_CREATE_INFERIOR_HOOK, SOLIB_REMOVE_INFERIOR_HOOK)
(SOLIB_IN_DYNAMIC_LINKER, SOLIB_RESTART)
(DISABLE_UNSETTABLE_BREAK, PC_SOLIB)
(IN_SOLIB_DYNSYM_RESOLVE_CODE): Remove defines and orphaned
comments.
* breakpoint.c: Include "solib.h".
(insert_bp_location) [!DISABLE_UNSETTABLE_BREAK]: Call
solib_address.
(remove_solib_event_breakpoints, create_solib_event_breakpoint)
(disable_breakpoints_in_shlibs)
(disable_breakpoints_in_unloaded_shlib)
(re_enable_breakpoints_in_shlibs): Compile if SOLIB_ADD isn't
defined. If PC_SOLIB isn't defined, call solib_address.
(_initialize_breakpoint): Unconditionally install observer.
* corelow.c: Include "solib.h".
[SOLIB_ADD] (solib_add_stub): Remove prototype.
(core_close) [!CLEAR_SOLIB]: Call clear_solib.
(solib_add_stub) [!SOLIB_ADD] Call solib_add.
(core_open): Unconditionally call solib_add_stub.
* fork-child.c: Include "solib.h".
(fork_inferior) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
* infcmd.c: Include "solib.h".
(attach_command) [!SOLIB_ADD]: Call shlib_rescan. Unconditionally
call re_enable_breakpoints_in_shlibs.
* infrun.c: Include "solib.h".
(SOLIB_IN_SYNSYM_RESOLVE_CODE): Don't define if not already
defined.
(stop_on_solib_events, show_stop_on_solib_events): Include
unconditionally.
(follow_exec) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
(handle_inferior_event) [!SOLIB_ADD]: Call shlib_add.
[!IN_SOLIB_DYNSYM_RESOLVE_CODE]: Call in_solib_dynsym_resolve_code.
(_initialize_infrun): Unconditionally add "stop_on_solib-events"
command.
* remote.c: Include "solib.h".
(remote_open_1): Unconditionally call no_shared_libraries.
[!SOLIB_CREATE_INFERIOR_HOOK] Call solib_create_inferior_hook.
* stack.c: Include "solib.h".
(print_frame) [!PC_SOLIB] Call shlib_for_pc.
* xcoffsolib.c (no_shared_libraries): Remove function.
* Makefile.in (SFILES): Add solib.c.
(ALLDEPFILES): Remove solib.c.
(COMMON_OBS): Add solib.o.
(breakpoint.o, corelow.o, fork-chiled.o, infcmd.o, infrun.o)
(remote.o, stack.o): Update dependencies.
2005-05-12 22:21:18 +02:00
|
|
|
|
#endif
|
|
|
|
|
)
|
2007-09-23 09:56:22 +02:00
|
|
|
|
{
|
|
|
|
|
loc->shlib_disabled = 1;
|
|
|
|
|
}
|
2004-02-03 23:47:40 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2004-09-01 20:00:29 +02:00
|
|
|
|
/* Disable any breakpoints that are in in an unloaded shared library. Only
|
|
|
|
|
apply to enabled breakpoints, disabled ones can just stay disabled. */
|
|
|
|
|
|
2007-11-20 09:16:15 +01:00
|
|
|
|
static void
|
2004-09-01 20:00:29 +02:00
|
|
|
|
disable_breakpoints_in_unloaded_shlib (struct so_list *solib)
|
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
struct bp_location *loc;
|
2004-09-01 20:00:29 +02:00
|
|
|
|
int disabled_shlib_breaks = 0;
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
ALL_BP_LOCATIONS (loc)
|
2004-09-01 20:00:29 +02:00
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
struct breakpoint *b = loc->owner;
|
|
|
|
|
if ((loc->loc_type == bp_loc_hardware_breakpoint
|
|
|
|
|
|| loc->loc_type == bp_loc_software_breakpoint)
|
|
|
|
|
&& !loc->shlib_disabled)
|
2004-09-01 20:00:29 +02:00
|
|
|
|
{
|
* solib.h (CLEAR_SOLIB, SOLIB_ADD)
(SOLIB_CREATE_INFERIOR_HOOK, SOLIB_REMOVE_INFERIOR_HOOK)
(SOLIB_IN_DYNAMIC_LINKER, SOLIB_RESTART)
(DISABLE_UNSETTABLE_BREAK, PC_SOLIB)
(IN_SOLIB_DYNSYM_RESOLVE_CODE): Remove defines and orphaned
comments.
* breakpoint.c: Include "solib.h".
(insert_bp_location) [!DISABLE_UNSETTABLE_BREAK]: Call
solib_address.
(remove_solib_event_breakpoints, create_solib_event_breakpoint)
(disable_breakpoints_in_shlibs)
(disable_breakpoints_in_unloaded_shlib)
(re_enable_breakpoints_in_shlibs): Compile if SOLIB_ADD isn't
defined. If PC_SOLIB isn't defined, call solib_address.
(_initialize_breakpoint): Unconditionally install observer.
* corelow.c: Include "solib.h".
[SOLIB_ADD] (solib_add_stub): Remove prototype.
(core_close) [!CLEAR_SOLIB]: Call clear_solib.
(solib_add_stub) [!SOLIB_ADD] Call solib_add.
(core_open): Unconditionally call solib_add_stub.
* fork-child.c: Include "solib.h".
(fork_inferior) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
* infcmd.c: Include "solib.h".
(attach_command) [!SOLIB_ADD]: Call shlib_rescan. Unconditionally
call re_enable_breakpoints_in_shlibs.
* infrun.c: Include "solib.h".
(SOLIB_IN_SYNSYM_RESOLVE_CODE): Don't define if not already
defined.
(stop_on_solib_events, show_stop_on_solib_events): Include
unconditionally.
(follow_exec) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
(handle_inferior_event) [!SOLIB_ADD]: Call shlib_add.
[!IN_SOLIB_DYNSYM_RESOLVE_CODE]: Call in_solib_dynsym_resolve_code.
(_initialize_infrun): Unconditionally add "stop_on_solib-events"
command.
* remote.c: Include "solib.h".
(remote_open_1): Unconditionally call no_shared_libraries.
[!SOLIB_CREATE_INFERIOR_HOOK] Call solib_create_inferior_hook.
* stack.c: Include "solib.h".
(print_frame) [!PC_SOLIB] Call shlib_for_pc.
* xcoffsolib.c (no_shared_libraries): Remove function.
* Makefile.in (SFILES): Add solib.c.
(ALLDEPFILES): Remove solib.c.
(COMMON_OBS): Add solib.o.
(breakpoint.o, corelow.o, fork-chiled.o, infcmd.o, infrun.o)
(remote.o, stack.o): Update dependencies.
2005-05-12 22:21:18 +02:00
|
|
|
|
#ifdef PC_SOLIB
|
2007-09-23 09:56:22 +02:00
|
|
|
|
char *so_name = PC_SOLIB (loc->address);
|
* solib.h (CLEAR_SOLIB, SOLIB_ADD)
(SOLIB_CREATE_INFERIOR_HOOK, SOLIB_REMOVE_INFERIOR_HOOK)
(SOLIB_IN_DYNAMIC_LINKER, SOLIB_RESTART)
(DISABLE_UNSETTABLE_BREAK, PC_SOLIB)
(IN_SOLIB_DYNSYM_RESOLVE_CODE): Remove defines and orphaned
comments.
* breakpoint.c: Include "solib.h".
(insert_bp_location) [!DISABLE_UNSETTABLE_BREAK]: Call
solib_address.
(remove_solib_event_breakpoints, create_solib_event_breakpoint)
(disable_breakpoints_in_shlibs)
(disable_breakpoints_in_unloaded_shlib)
(re_enable_breakpoints_in_shlibs): Compile if SOLIB_ADD isn't
defined. If PC_SOLIB isn't defined, call solib_address.
(_initialize_breakpoint): Unconditionally install observer.
* corelow.c: Include "solib.h".
[SOLIB_ADD] (solib_add_stub): Remove prototype.
(core_close) [!CLEAR_SOLIB]: Call clear_solib.
(solib_add_stub) [!SOLIB_ADD] Call solib_add.
(core_open): Unconditionally call solib_add_stub.
* fork-child.c: Include "solib.h".
(fork_inferior) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
* infcmd.c: Include "solib.h".
(attach_command) [!SOLIB_ADD]: Call shlib_rescan. Unconditionally
call re_enable_breakpoints_in_shlibs.
* infrun.c: Include "solib.h".
(SOLIB_IN_SYNSYM_RESOLVE_CODE): Don't define if not already
defined.
(stop_on_solib_events, show_stop_on_solib_events): Include
unconditionally.
(follow_exec) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
(handle_inferior_event) [!SOLIB_ADD]: Call shlib_add.
[!IN_SOLIB_DYNSYM_RESOLVE_CODE]: Call in_solib_dynsym_resolve_code.
(_initialize_infrun): Unconditionally add "stop_on_solib-events"
command.
* remote.c: Include "solib.h".
(remote_open_1): Unconditionally call no_shared_libraries.
[!SOLIB_CREATE_INFERIOR_HOOK] Call solib_create_inferior_hook.
* stack.c: Include "solib.h".
(print_frame) [!PC_SOLIB] Call shlib_for_pc.
* xcoffsolib.c (no_shared_libraries): Remove function.
* Makefile.in (SFILES): Add solib.c.
(ALLDEPFILES): Remove solib.c.
(COMMON_OBS): Add solib.o.
(breakpoint.o, corelow.o, fork-chiled.o, infcmd.o, infrun.o)
(remote.o, stack.o): Update dependencies.
2005-05-12 22:21:18 +02:00
|
|
|
|
#else
|
2007-09-23 09:56:22 +02:00
|
|
|
|
char *so_name = solib_address (loc->address);
|
* solib.h (CLEAR_SOLIB, SOLIB_ADD)
(SOLIB_CREATE_INFERIOR_HOOK, SOLIB_REMOVE_INFERIOR_HOOK)
(SOLIB_IN_DYNAMIC_LINKER, SOLIB_RESTART)
(DISABLE_UNSETTABLE_BREAK, PC_SOLIB)
(IN_SOLIB_DYNSYM_RESOLVE_CODE): Remove defines and orphaned
comments.
* breakpoint.c: Include "solib.h".
(insert_bp_location) [!DISABLE_UNSETTABLE_BREAK]: Call
solib_address.
(remove_solib_event_breakpoints, create_solib_event_breakpoint)
(disable_breakpoints_in_shlibs)
(disable_breakpoints_in_unloaded_shlib)
(re_enable_breakpoints_in_shlibs): Compile if SOLIB_ADD isn't
defined. If PC_SOLIB isn't defined, call solib_address.
(_initialize_breakpoint): Unconditionally install observer.
* corelow.c: Include "solib.h".
[SOLIB_ADD] (solib_add_stub): Remove prototype.
(core_close) [!CLEAR_SOLIB]: Call clear_solib.
(solib_add_stub) [!SOLIB_ADD] Call solib_add.
(core_open): Unconditionally call solib_add_stub.
* fork-child.c: Include "solib.h".
(fork_inferior) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
* infcmd.c: Include "solib.h".
(attach_command) [!SOLIB_ADD]: Call shlib_rescan. Unconditionally
call re_enable_breakpoints_in_shlibs.
* infrun.c: Include "solib.h".
(SOLIB_IN_SYNSYM_RESOLVE_CODE): Don't define if not already
defined.
(stop_on_solib_events, show_stop_on_solib_events): Include
unconditionally.
(follow_exec) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
(handle_inferior_event) [!SOLIB_ADD]: Call shlib_add.
[!IN_SOLIB_DYNSYM_RESOLVE_CODE]: Call in_solib_dynsym_resolve_code.
(_initialize_infrun): Unconditionally add "stop_on_solib-events"
command.
* remote.c: Include "solib.h".
(remote_open_1): Unconditionally call no_shared_libraries.
[!SOLIB_CREATE_INFERIOR_HOOK] Call solib_create_inferior_hook.
* stack.c: Include "solib.h".
(print_frame) [!PC_SOLIB] Call shlib_for_pc.
* xcoffsolib.c (no_shared_libraries): Remove function.
* Makefile.in (SFILES): Add solib.c.
(ALLDEPFILES): Remove solib.c.
(COMMON_OBS): Add solib.o.
(breakpoint.o, corelow.o, fork-chiled.o, infcmd.o, infrun.o)
(remote.o, stack.o): Update dependencies.
2005-05-12 22:21:18 +02:00
|
|
|
|
#endif
|
|
|
|
|
if (so_name && !strcmp (so_name, solib->so_name))
|
2004-09-01 20:00:29 +02:00
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
loc->shlib_disabled = 1;
|
2004-09-01 20:00:29 +02:00
|
|
|
|
/* At this point, we cannot rely on remove_breakpoint
|
|
|
|
|
succeeding so we must mark the breakpoint as not inserted
|
|
|
|
|
to prevent future errors occurring in remove_breakpoints. */
|
2007-09-23 09:56:22 +02:00
|
|
|
|
loc->inserted = 0;
|
2004-09-01 20:00:29 +02:00
|
|
|
|
if (!disabled_shlib_breaks)
|
|
|
|
|
{
|
|
|
|
|
target_terminal_ours_for_output ();
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("Temporarily disabling breakpoints for unloaded shared library \"%s\""),
|
2004-09-01 20:00:29 +02:00
|
|
|
|
so_name);
|
|
|
|
|
}
|
|
|
|
|
disabled_shlib_breaks = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
create_fork_vfork_event_catchpoint (int tempflag, char *cond_string,
|
|
|
|
|
enum bptype bp_kind)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
struct symtab_and_line sal;
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
int thread = -1; /* All threads. */
|
|
|
|
|
|
2002-10-24 23:02:53 +02:00
|
|
|
|
init_sal (&sal);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
sal.pc = 0;
|
|
|
|
|
sal.symtab = NULL;
|
|
|
|
|
sal.line = 0;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2001-05-11 21:46:35 +02:00
|
|
|
|
b = set_raw_breakpoint (sal, bp_kind);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
set_breakpoint_count (breakpoint_count + 1);
|
|
|
|
|
b->number = breakpoint_count;
|
1999-08-24 00:40:00 +02:00
|
|
|
|
b->cond_string = (cond_string == NULL) ?
|
|
|
|
|
NULL : savestring (cond_string, strlen (cond_string));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
b->thread = thread;
|
|
|
|
|
b->addr_string = NULL;
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->enable_state = bp_enabled;
|
|
|
|
|
b->disposition = tempflag ? disp_del : disp_donttouch;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
b->forked_inferior_pid = 0;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
mention (b);
|
|
|
|
|
}
|
|
|
|
|
|
2007-11-05 19:18:47 +01:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
create_fork_event_catchpoint (int tempflag, char *cond_string)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
create_fork_vfork_event_catchpoint (tempflag, cond_string, bp_catch_fork);
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2007-11-05 19:18:47 +01:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
create_vfork_event_catchpoint (int tempflag, char *cond_string)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
create_fork_vfork_event_catchpoint (tempflag, cond_string, bp_catch_vfork);
|
|
|
|
|
}
|
|
|
|
|
|
2007-11-05 19:18:47 +01:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
create_exec_event_catchpoint (int tempflag, char *cond_string)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
struct symtab_and_line sal;
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
int thread = -1; /* All threads. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2002-10-24 23:02:53 +02:00
|
|
|
|
init_sal (&sal);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
sal.pc = 0;
|
|
|
|
|
sal.symtab = NULL;
|
|
|
|
|
sal.line = 0;
|
|
|
|
|
|
2001-05-11 21:46:35 +02:00
|
|
|
|
b = set_raw_breakpoint (sal, bp_catch_exec);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
set_breakpoint_count (breakpoint_count + 1);
|
|
|
|
|
b->number = breakpoint_count;
|
1999-08-24 00:40:00 +02:00
|
|
|
|
b->cond_string = (cond_string == NULL) ?
|
|
|
|
|
NULL : savestring (cond_string, strlen (cond_string));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
b->thread = thread;
|
|
|
|
|
b->addr_string = NULL;
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->enable_state = bp_enabled;
|
|
|
|
|
b->disposition = tempflag ? disp_del : disp_donttouch;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
mention (b);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
hw_breakpoint_used_count (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2001-08-02 13:58:29 +02:00
|
|
|
|
if (b->type == bp_hardware_breakpoint && b->enable_state == bp_enabled)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
i++;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
return i;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
hw_watchpoint_used_count (enum bptype type, int *other_type_used)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
*other_type_used = 0;
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2003-12-12 20:04:46 +01:00
|
|
|
|
if (breakpoint_enabled (b))
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
if (b->type == type)
|
|
|
|
|
i++;
|
|
|
|
|
else if ((b->type == bp_hardware_watchpoint ||
|
|
|
|
|
b->type == bp_read_watchpoint ||
|
2003-12-12 20:04:46 +01:00
|
|
|
|
b->type == bp_access_watchpoint))
|
1999-07-07 22:19:36 +02:00
|
|
|
|
*other_type_used = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return i;
|
|
|
|
|
}
|
|
|
|
|
|
1999-08-24 00:40:00 +02:00
|
|
|
|
/* Call this after hitting the longjmp() breakpoint. Use this to set
|
|
|
|
|
a new breakpoint at the target of the jmp_buf.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-08-24 00:40:00 +02:00
|
|
|
|
FIXME - This ought to be done by setting a temporary breakpoint
|
|
|
|
|
that gets deleted automatically... */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
void
|
2002-12-11 23:34:47 +01:00
|
|
|
|
set_longjmp_resume_breakpoint (CORE_ADDR pc, struct frame_id frame_id)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->type == bp_longjmp_resume)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
* breakpoint.h (enum bp_loc_type, struct bp_location): New.
(struct breakpoint): Remove address, shadow_contents, inserted,
and duplicate. Add a struct bp_location.
* breakpoint.c (condition_command, read_memory_nobpt)
(insert_breakpoints, remove_breakpoints, remove_hw_watchpoints)
(reattach_breakpoints, update_breakpoints_after_exec)
(detach_breakpoints, remove_breakpoint, mark_breakpoints_out)
(breakpoint_init_inferior, breakpoint_here_p)
(breakpoint_inserted_here_p, deprecated_frame_in_dummy)
(breakpoint_thread_match, bpstat_stop_status)
(bpstat_have_active_hw_watchpoints, print_one_breakpoint)
(describe_other_breakpoints, check_duplicates)
(make_breakpoint_permanent, create_thread_event_breakpoint)
(disable_breakpoints_in_shlibs, re_enable_berakpoints_in_shlibs)
(set_longjmp_resume_breakpoint, mention, create_breakpoints)
(watch_command_1, print_one_exception_catchpoint)
(clear_command, breakpoint_re_set_one): Adjust member accesses to
use the breakpoint's ->loc.
(set_raw_breakpoint): Likewise. Initialize ->loc.
(delete_breakpoint): Likewise. Free ->loc.
2003-11-06 18:24:38 +01:00
|
|
|
|
b->loc->requested_address = pc;
|
2004-03-19 21:49:43 +01:00
|
|
|
|
b->loc->address = adjust_breakpoint_address (b->loc->requested_address,
|
|
|
|
|
b->type);
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->enable_state = bp_enabled;
|
2002-12-11 23:34:47 +01:00
|
|
|
|
b->frame_id = frame_id;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
1999-07-07 22:19:36 +02:00
|
|
|
|
return;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
disable_watchpoints_before_interactive_call_start (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
struct breakpoint *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
if (((b->type == bp_watchpoint)
|
|
|
|
|
|| (b->type == bp_hardware_watchpoint)
|
|
|
|
|
|| (b->type == bp_read_watchpoint)
|
Remove unused support for target-based exception catching.
* target.h (struct target_ops): Delete
to_enable_exception_callback and to_get_current_exception_event
members.
(target_enable_exception_callback)
(target_get_current_exception_event): Delete macros.
* target.c (update_current_target): Remove code to inherit and
default those members.
(debug_to_enable_exception_callback)
(debug_to_get_current_exception_event): Delete functions.
(setup_target_debug): Don't install those methods.
* inf-child.c (inf_child_enable_exception_callback)
(inf_child_get_current_exception_event): Delete dummy functions.
(inf_child_target): Don't install them in the target vector.
* breakpoint.h (enum bptype): Delete bp_catch_catch,
bp_catch_throw.
* breakpoint.c (cover_target_enable_exception_callback)
(ep_is_exception_catchpoint, create_exception_catchpoint): Delete
functions.
(insert_bp_location, update_breakpoints_after_exec)
(remove_breakpoint, ep_is_catchpoint, print_it_typical)
(bpstat_stop_status, bpstat_what)
(bpstat_get_triggered_catchpoints, print_one_breakpoint_location)
(user_settable_breakpoint, allocate_bp_location)
(disable_watchpoints_before_interactive_call_start)
(enable_watchpoints_after_interactive_call_stop, mention)
(delete_breakpoint, breakpoint_re_set_one, disable_command)
(enable_command): Remove exception catchpoint cases.
(catch_exception_command_1): Don't try target-based exception
handling.
* stack.c (catch_info): Call print_frame_label_vars
unconditionally.
2007-12-13 03:00:09 +01:00
|
|
|
|
|| (b->type == bp_access_watchpoint))
|
2003-12-12 20:04:46 +01:00
|
|
|
|
&& breakpoint_enabled (b))
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->enable_state = bp_call_disabled;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
enable_watchpoints_after_interactive_call_stop (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
struct breakpoint *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
if (((b->type == bp_watchpoint)
|
|
|
|
|
|| (b->type == bp_hardware_watchpoint)
|
|
|
|
|
|| (b->type == bp_read_watchpoint)
|
Remove unused support for target-based exception catching.
* target.h (struct target_ops): Delete
to_enable_exception_callback and to_get_current_exception_event
members.
(target_enable_exception_callback)
(target_get_current_exception_event): Delete macros.
* target.c (update_current_target): Remove code to inherit and
default those members.
(debug_to_enable_exception_callback)
(debug_to_get_current_exception_event): Delete functions.
(setup_target_debug): Don't install those methods.
* inf-child.c (inf_child_enable_exception_callback)
(inf_child_get_current_exception_event): Delete dummy functions.
(inf_child_target): Don't install them in the target vector.
* breakpoint.h (enum bptype): Delete bp_catch_catch,
bp_catch_throw.
* breakpoint.c (cover_target_enable_exception_callback)
(ep_is_exception_catchpoint, create_exception_catchpoint): Delete
functions.
(insert_bp_location, update_breakpoints_after_exec)
(remove_breakpoint, ep_is_catchpoint, print_it_typical)
(bpstat_stop_status, bpstat_what)
(bpstat_get_triggered_catchpoints, print_one_breakpoint_location)
(user_settable_breakpoint, allocate_bp_location)
(disable_watchpoints_before_interactive_call_start)
(enable_watchpoints_after_interactive_call_stop, mention)
(delete_breakpoint, breakpoint_re_set_one, disable_command)
(enable_command): Remove exception catchpoint cases.
(catch_exception_command_1): Don't try target-based exception
handling.
* stack.c (catch_info): Call print_frame_label_vars
unconditionally.
2007-12-13 03:00:09 +01:00
|
|
|
|
|| (b->type == bp_access_watchpoint))
|
2001-08-02 13:58:29 +02:00
|
|
|
|
&& (b->enable_state == bp_call_disabled))
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->enable_state = bp_enabled;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Set a breakpoint that will evaporate an end of command
|
|
|
|
|
at address specified by SAL.
|
|
|
|
|
Restrict it to frame FRAME if FRAME is nonzero. */
|
|
|
|
|
|
|
|
|
|
struct breakpoint *
|
2002-12-11 23:34:47 +01:00
|
|
|
|
set_momentary_breakpoint (struct symtab_and_line sal, struct frame_id frame_id,
|
2000-07-30 03:48:28 +02:00
|
|
|
|
enum bptype type)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
2001-05-11 21:46:35 +02:00
|
|
|
|
b = set_raw_breakpoint (sal, type);
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->enable_state = bp_enabled;
|
|
|
|
|
b->disposition = disp_donttouch;
|
2002-12-11 23:34:47 +01:00
|
|
|
|
b->frame_id = frame_id;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* If we're debugging a multi-threaded program, then we
|
|
|
|
|
want momentary breakpoints to be active in only a
|
|
|
|
|
single thread of control. */
|
2001-05-04 06:15:33 +02:00
|
|
|
|
if (in_thread_list (inferior_ptid))
|
|
|
|
|
b->thread = pid_to_thread_id (inferior_ptid);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list_nothrow ();
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return b;
|
|
|
|
|
}
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Tell the user we have just set a breakpoint B. */
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
mention (struct breakpoint *b)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
int say_where = 0;
|
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
2003-02-03 02:18:37 +01:00
|
|
|
|
struct cleanup *old_chain, *ui_out_chain;
|
2000-02-03 05:14:45 +01:00
|
|
|
|
struct ui_stream *stb;
|
|
|
|
|
|
|
|
|
|
stb = ui_out_stream_new (uiout);
|
2000-05-15 05:16:15 +02:00
|
|
|
|
old_chain = make_cleanup_ui_out_stream_delete (stb);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2004-04-21 Andrew Cagney <cagney@redhat.com>
* annotate.h (deprecated_annotate_starting_hook)
(deprecated_annotate_stopped_hook)
(deprecated_annotate_exited_hook)
(deprecated_annotate_signal_hook)
(deprecated_annotate_signalled_hook): Deprecate.
* tracepoint.h (deprecated_create_tracepoint_hook)
(deprecated_delete_tracepoint_hook)
(deprecated_modify_tracepoint_hook)
(deprecated_trace_find_hook)
(deprecated_trace_start_stop_hook): Deprecate.
* target.h (deprecated_target_new_objfile_hook): Deprecate.
* remote.h (deprecated_target_resume_hook)
(deprecated_target_wait_loop_hook): Deprecate.
* gdbcore.h (deprecated_exec_file_display_hook)
(deprecated_file_changed_hook): Deprecate.
* frame.h (deprecated_selected_frame_level_changed_hook): Deprecate.
* defs.h (deprecated_modify_breakpoint_hook)
(deprecated_command_loop_hook, deprecated_show_load_progress)
(deprecated_print_frame_info_listing_hook)
(deprecated_query_hook, deprecated_warning_hook)
(deprecated_flush_hook, deprecated_create_breakpoint_hook)
(deprecated_delete_breakpoint_hook)
(deprecated_interactive_hook, deprecated_registers_changed_hook)
(deprecated_readline_begin_hook, deprecated_readline_hook)
(deprecated_readline_end_hook, deprecated_register_changed_hook)
(deprecated_memory_changed_hook, deprecated_init_ui_hook)
(deprecated_context_hook, deprecated_target_wait_hook)
(deprecated_attach_hook, deprecated_detach_hook)
(deprecated_call_command_hook, deprecated_set_hook)
(deprecated_error_hook, deprecated_error_begin_hook)
(deprecated_ui_load_progress_hook): Deprecate.
* valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update.
* tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update.
* target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update.
* remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update.
* main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update.
* exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update.
* annotate.c, aix-thread.c: Update.
2004-04-22 01:52:21 +02:00
|
|
|
|
/* FIXME: This is misplaced; mention() is called by things (like
|
|
|
|
|
hitting a watchpoint) other than breakpoint creation. It should
|
|
|
|
|
be possible to clean this up and at the same time replace the
|
|
|
|
|
random calls to breakpoint_changed with this hook, as has already
|
|
|
|
|
been done for deprecated_delete_breakpoint_hook and so on. */
|
|
|
|
|
if (deprecated_create_breakpoint_hook)
|
|
|
|
|
deprecated_create_breakpoint_hook (b);
|
1999-08-31 03:14:27 +02:00
|
|
|
|
breakpoint_create_event (b->number);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-04-27 03:11:10 +02:00
|
|
|
|
if (b->ops != NULL && b->ops->print_mention != NULL)
|
|
|
|
|
b->ops->print_mention (b);
|
|
|
|
|
else
|
|
|
|
|
switch (b->type)
|
|
|
|
|
{
|
|
|
|
|
case bp_none:
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("(apparently deleted?) Eventpoint %d: "), b->number);
|
2003-04-27 03:11:10 +02:00
|
|
|
|
break;
|
|
|
|
|
case bp_watchpoint:
|
|
|
|
|
ui_out_text (uiout, "Watchpoint ");
|
|
|
|
|
ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "wpt");
|
|
|
|
|
ui_out_field_int (uiout, "number", b->number);
|
|
|
|
|
ui_out_text (uiout, ": ");
|
|
|
|
|
print_expression (b->exp, stb->stream);
|
|
|
|
|
ui_out_field_stream (uiout, "exp", stb);
|
|
|
|
|
do_cleanups (ui_out_chain);
|
|
|
|
|
break;
|
|
|
|
|
case bp_hardware_watchpoint:
|
|
|
|
|
ui_out_text (uiout, "Hardware watchpoint ");
|
|
|
|
|
ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "wpt");
|
|
|
|
|
ui_out_field_int (uiout, "number", b->number);
|
|
|
|
|
ui_out_text (uiout, ": ");
|
|
|
|
|
print_expression (b->exp, stb->stream);
|
|
|
|
|
ui_out_field_stream (uiout, "exp", stb);
|
|
|
|
|
do_cleanups (ui_out_chain);
|
|
|
|
|
break;
|
|
|
|
|
case bp_read_watchpoint:
|
|
|
|
|
ui_out_text (uiout, "Hardware read watchpoint ");
|
|
|
|
|
ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "hw-rwpt");
|
|
|
|
|
ui_out_field_int (uiout, "number", b->number);
|
|
|
|
|
ui_out_text (uiout, ": ");
|
|
|
|
|
print_expression (b->exp, stb->stream);
|
|
|
|
|
ui_out_field_stream (uiout, "exp", stb);
|
|
|
|
|
do_cleanups (ui_out_chain);
|
|
|
|
|
break;
|
|
|
|
|
case bp_access_watchpoint:
|
|
|
|
|
ui_out_text (uiout, "Hardware access (read/write) watchpoint ");
|
|
|
|
|
ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "hw-awpt");
|
|
|
|
|
ui_out_field_int (uiout, "number", b->number);
|
|
|
|
|
ui_out_text (uiout, ": ");
|
|
|
|
|
print_expression (b->exp, stb->stream);
|
|
|
|
|
ui_out_field_stream (uiout, "exp", stb);
|
|
|
|
|
do_cleanups (ui_out_chain);
|
|
|
|
|
break;
|
|
|
|
|
case bp_breakpoint:
|
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
|
|
|
|
{
|
|
|
|
|
say_where = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2008-04-15 16:32:12 +02:00
|
|
|
|
if (b->disposition == disp_del)
|
|
|
|
|
printf_filtered (_("Temporary breakpoint"));
|
|
|
|
|
else
|
|
|
|
|
printf_filtered (_("Breakpoint"));
|
|
|
|
|
printf_filtered (_(" %d"), b->number);
|
2003-04-27 03:11:10 +02:00
|
|
|
|
say_where = 1;
|
|
|
|
|
break;
|
|
|
|
|
case bp_hardware_breakpoint:
|
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
|
|
|
|
{
|
|
|
|
|
say_where = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Hardware assisted breakpoint %d"), b->number);
|
2003-04-27 03:11:10 +02:00
|
|
|
|
say_where = 1;
|
|
|
|
|
break;
|
|
|
|
|
case bp_catch_load:
|
|
|
|
|
case bp_catch_unload:
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Catchpoint %d (%s %s)"),
|
2003-04-27 03:11:10 +02:00
|
|
|
|
b->number,
|
|
|
|
|
(b->type == bp_catch_load) ? "load" : "unload",
|
|
|
|
|
(b->dll_pathname != NULL) ?
|
|
|
|
|
b->dll_pathname : "<any library>");
|
|
|
|
|
break;
|
|
|
|
|
case bp_catch_fork:
|
|
|
|
|
case bp_catch_vfork:
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Catchpoint %d (%s)"),
|
2003-04-27 03:11:10 +02:00
|
|
|
|
b->number,
|
|
|
|
|
(b->type == bp_catch_fork) ? "fork" : "vfork");
|
|
|
|
|
break;
|
|
|
|
|
case bp_catch_exec:
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Catchpoint %d (exec)"),
|
2003-04-27 03:11:10 +02:00
|
|
|
|
b->number);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_until:
|
|
|
|
|
case bp_finish:
|
|
|
|
|
case bp_longjmp:
|
|
|
|
|
case bp_longjmp_resume:
|
|
|
|
|
case bp_step_resume:
|
|
|
|
|
case bp_call_dummy:
|
|
|
|
|
case bp_watchpoint_scope:
|
|
|
|
|
case bp_shlib_event:
|
|
|
|
|
case bp_thread_event:
|
|
|
|
|
case bp_overlay_event:
|
|
|
|
|
break;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
if (say_where)
|
|
|
|
|
{
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
/* i18n: cagney/2005-02-11: Below needs to be merged into a
|
|
|
|
|
single string. */
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (b->loc == NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_(" (%s) pending."), b->addr_string);
|
2004-02-02 22:10:49 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (addressprint || b->source_file == NULL)
|
|
|
|
|
{
|
|
|
|
|
printf_filtered (" at ");
|
* exec.c: #include "arch-utils.h"
(print_section_info): Use gdbarch_from_bfd to get at the
current architecture. Replace current_gdbarch. Fix indention.
Replace deprecated_print_address_numeric by paddress.
* Makefile.in (exec.o) Add dependency to arch-utils.h.
* valprint.c (val_print_string): Replace
deprecated_print_address_numeric.
* tracepoint.c (trace_mention, scope_info): Likewise.
* symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1, print_symbol)
(print_symbol, print_partial_symbols, maintenance_info_psymtabs)
(maintenance_check_symtabs): Likewise.
* symfile.c (list_overlays_command): Likewise.
* stack.c (frame_info, print_block_frame_labels): Likewise.
* printcmd.c (print_address, print_address_demangle)
(address_info): Likewise.
* corefile.c (memory_error): Likewise.
* infcmd.c (jump_command): Likewise.
* breakpoint.c (insert_bp_location, describe_other_breakpoints)
(mention, delete_breakpoint): Likewise.
* c-valprint.c (print_function_pointer_address, c_val_print): Likewise.
* dwarf2read.c (dump_die): Likewise.
* ada-valprint.c (ada_val_print_1): Likewise.
* f-valprint.c (f_val_print): Likewise.
* linux-fork.c (info_forks_command): Likewise.
* m32r-com.c (m32r_load_section, m32r_load)
(m32r_upload_command): Likewise.
* ui-out.c (ui_out_field_core_addr): Remove unnecessary comment.
2008-01-11 14:34:15 +01:00
|
|
|
|
fputs_filtered (paddress (b->loc->address), gdb_stdout);
|
2004-02-02 22:10:49 +01:00
|
|
|
|
}
|
|
|
|
|
if (b->source_file)
|
|
|
|
|
printf_filtered (": file %s, line %d.",
|
|
|
|
|
b->source_file, b->line_number);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
|
|
|
|
|
if (b->loc->next)
|
|
|
|
|
{
|
|
|
|
|
struct bp_location *loc = b->loc;
|
|
|
|
|
int n = 0;
|
|
|
|
|
for (; loc; loc = loc->next)
|
|
|
|
|
++n;
|
|
|
|
|
printf_filtered (" (%d locations)", n);
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2000-02-03 05:14:45 +01:00
|
|
|
|
do_cleanups (old_chain);
|
2001-07-06 05:53:11 +02:00
|
|
|
|
if (ui_out_is_mi_like_p (uiout))
|
2000-02-23 01:25:43 +01:00
|
|
|
|
return;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
printf_filtered ("\n");
|
|
|
|
|
}
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
static struct bp_location *
|
|
|
|
|
add_location_to_breakpoint (struct breakpoint *b, enum bptype bptype,
|
|
|
|
|
const struct symtab_and_line *sal)
|
|
|
|
|
{
|
|
|
|
|
struct bp_location *loc, **tmp;
|
|
|
|
|
|
|
|
|
|
loc = allocate_bp_location (b, bptype);
|
|
|
|
|
for (tmp = &(b->loc); *tmp != NULL; tmp = &((*tmp)->next))
|
|
|
|
|
;
|
|
|
|
|
*tmp = loc;
|
|
|
|
|
loc->requested_address = sal->pc;
|
|
|
|
|
loc->address = adjust_breakpoint_address (loc->requested_address,
|
|
|
|
|
bptype);
|
|
|
|
|
loc->section = sal->section;
|
|
|
|
|
|
|
|
|
|
set_breakpoint_location_function (loc);
|
|
|
|
|
return loc;
|
|
|
|
|
}
|
2000-01-06 04:07:20 +01:00
|
|
|
|
|
2007-09-22 21:10:05 +02:00
|
|
|
|
/* Create a breakpoint with SAL as location. Use ADDR_STRING
|
|
|
|
|
as textual description of the location, and COND_STRING
|
2007-11-08 17:43:39 +01:00
|
|
|
|
as condition expression. */
|
2007-09-22 21:10:05 +02:00
|
|
|
|
|
|
|
|
|
static void
|
2007-09-23 09:56:22 +02:00
|
|
|
|
create_breakpoint (struct symtabs_and_lines sals, char *addr_string,
|
2007-09-22 21:10:05 +02:00
|
|
|
|
char *cond_string,
|
|
|
|
|
enum bptype type, enum bpdisp disposition,
|
2008-05-01 22:35:33 +02:00
|
|
|
|
int thread, int ignore_count,
|
|
|
|
|
struct breakpoint_ops *ops, int from_tty)
|
2007-09-22 21:10:05 +02:00
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
struct breakpoint *b = NULL;
|
|
|
|
|
int i;
|
2007-09-22 21:10:05 +02:00
|
|
|
|
|
|
|
|
|
if (type == bp_hardware_breakpoint)
|
|
|
|
|
{
|
|
|
|
|
int i = hw_breakpoint_used_count ();
|
|
|
|
|
int target_resources_ok =
|
|
|
|
|
TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_hardware_breakpoint,
|
|
|
|
|
i + 1, 0);
|
|
|
|
|
if (target_resources_ok == 0)
|
|
|
|
|
error (_("No hardware breakpoint support in the target."));
|
|
|
|
|
else if (target_resources_ok < 0)
|
|
|
|
|
error (_("Hardware breakpoints used exceeds limit."));
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
for (i = 0; i < sals.nelts; ++i)
|
|
|
|
|
{
|
|
|
|
|
struct symtab_and_line sal = sals.sals[i];
|
|
|
|
|
struct bp_location *loc;
|
|
|
|
|
|
|
|
|
|
if (from_tty)
|
|
|
|
|
describe_other_breakpoints (sal.pc, sal.section, thread);
|
|
|
|
|
|
|
|
|
|
if (i == 0)
|
|
|
|
|
{
|
|
|
|
|
b = set_raw_breakpoint (sal, type);
|
|
|
|
|
set_breakpoint_count (breakpoint_count + 1);
|
|
|
|
|
b->number = breakpoint_count;
|
|
|
|
|
b->thread = thread;
|
2007-09-22 21:10:05 +02:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
b->cond_string = cond_string;
|
|
|
|
|
b->ignore_count = ignore_count;
|
|
|
|
|
b->enable_state = bp_enabled;
|
|
|
|
|
b->disposition = disposition;
|
2007-09-22 21:10:05 +02:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
loc = b->loc;
|
|
|
|
|
}
|
|
|
|
|
else
|
2007-09-22 21:10:05 +02:00
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
loc = add_location_to_breakpoint (b, type, &sal);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (b->cond_string)
|
|
|
|
|
{
|
|
|
|
|
char *arg = b->cond_string;
|
2007-09-26 20:44:55 +02:00
|
|
|
|
loc->cond = parse_exp_1 (&arg, block_for_pc (loc->address), 0);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (*arg)
|
2007-11-08 17:43:39 +01:00
|
|
|
|
error (_("Garbage %s follows condition"), arg);
|
2007-09-22 21:10:05 +02:00
|
|
|
|
}
|
2007-09-23 09:56:22 +02:00
|
|
|
|
}
|
2007-09-22 21:10:05 +02:00
|
|
|
|
|
|
|
|
|
if (addr_string)
|
|
|
|
|
b->addr_string = addr_string;
|
|
|
|
|
else
|
|
|
|
|
/* addr_string has to be used or breakpoint_re_set will delete
|
|
|
|
|
me. */
|
|
|
|
|
b->addr_string = xstrprintf ("*0x%s", paddr (b->loc->address));
|
|
|
|
|
|
2008-05-01 22:35:33 +02:00
|
|
|
|
b->ops = ops;
|
2007-09-22 21:10:05 +02:00
|
|
|
|
mention (b);
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-24 09:40:32 +02:00
|
|
|
|
/* Remove element at INDEX_TO_REMOVE from SAL, shifting other
|
|
|
|
|
elements to fill the void space. */
|
|
|
|
|
static void remove_sal (struct symtabs_and_lines *sal, int index_to_remove)
|
|
|
|
|
{
|
|
|
|
|
int i = index_to_remove+1;
|
|
|
|
|
int last_index = sal->nelts-1;
|
|
|
|
|
|
|
|
|
|
for (;i <= last_index; ++i)
|
|
|
|
|
sal->sals[i-1] = sal->sals[i];
|
|
|
|
|
|
|
|
|
|
--(sal->nelts);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* If appropriate, obtains all sals that correspond
|
|
|
|
|
to the same file and line as SAL. This is done
|
|
|
|
|
only if SAL does not have explicit PC and has
|
|
|
|
|
line and file information. If we got just a single
|
|
|
|
|
expanded sal, return the original.
|
|
|
|
|
|
|
|
|
|
Otherwise, if SAL.explicit_line is not set, filter out
|
|
|
|
|
all sals for which the name of enclosing function
|
|
|
|
|
is different from SAL. This makes sure that if we have
|
|
|
|
|
breakpoint originally set in template instantiation, say
|
|
|
|
|
foo<int>(), we won't expand SAL to locations at the same
|
|
|
|
|
line in all existing instantiations of 'foo'.
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
struct symtabs_and_lines
|
|
|
|
|
expand_line_sal_maybe (struct symtab_and_line sal)
|
|
|
|
|
{
|
|
|
|
|
struct symtabs_and_lines expanded;
|
|
|
|
|
CORE_ADDR original_pc = sal.pc;
|
|
|
|
|
char *original_function = NULL;
|
|
|
|
|
int found;
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
/* If we have explicit pc, don't expand.
|
|
|
|
|
If we have no line number, we can't expand. */
|
|
|
|
|
if (sal.explicit_pc || sal.line == 0 || sal.symtab == NULL)
|
|
|
|
|
{
|
|
|
|
|
expanded.nelts = 1;
|
|
|
|
|
expanded.sals = xmalloc (sizeof (struct symtab_and_line));
|
|
|
|
|
expanded.sals[0] = sal;
|
|
|
|
|
return expanded;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sal.pc = 0;
|
|
|
|
|
find_pc_partial_function (original_pc, &original_function, NULL, NULL);
|
|
|
|
|
|
|
|
|
|
expanded = expand_line_sal (sal);
|
|
|
|
|
if (expanded.nelts == 1)
|
|
|
|
|
{
|
|
|
|
|
/* We had one sal, we got one sal. Without futher
|
|
|
|
|
processing, just return the original sal. */
|
|
|
|
|
xfree (expanded.sals);
|
|
|
|
|
expanded.nelts = 1;
|
|
|
|
|
expanded.sals = xmalloc (sizeof (struct symtab_and_line));
|
|
|
|
|
sal.pc = original_pc;
|
|
|
|
|
expanded.sals[0] = sal;
|
|
|
|
|
return expanded;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!sal.explicit_line)
|
|
|
|
|
{
|
|
|
|
|
CORE_ADDR func_addr, func_end;
|
|
|
|
|
for (i = 0; i < expanded.nelts; ++i)
|
|
|
|
|
{
|
|
|
|
|
CORE_ADDR pc = expanded.sals[i].pc;
|
|
|
|
|
char *this_function;
|
|
|
|
|
if (find_pc_partial_function (pc, &this_function,
|
|
|
|
|
&func_addr, &func_end))
|
|
|
|
|
{
|
|
|
|
|
if (this_function &&
|
|
|
|
|
strcmp (this_function, original_function) != 0)
|
|
|
|
|
{
|
|
|
|
|
remove_sal (&expanded, i);
|
|
|
|
|
--i;
|
|
|
|
|
}
|
|
|
|
|
else if (func_addr == pc)
|
|
|
|
|
{
|
|
|
|
|
/* We're at beginning of a function, and should
|
|
|
|
|
skip prologue. */
|
|
|
|
|
struct symbol *sym = find_pc_function (pc);
|
|
|
|
|
if (sym)
|
|
|
|
|
expanded.sals[i] = find_function_start_sal (sym, 1);
|
|
|
|
|
else
|
|
|
|
|
expanded.sals[i].pc
|
|
|
|
|
= gdbarch_skip_prologue (current_gdbarch, pc);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (expanded.nelts <= 1)
|
|
|
|
|
{
|
|
|
|
|
/* This is un ugly workaround. If we get zero
|
|
|
|
|
expanded sals then something is really wrong.
|
|
|
|
|
Fix that by returnign the original sal. */
|
|
|
|
|
xfree (expanded.sals);
|
|
|
|
|
expanded.nelts = 1;
|
|
|
|
|
expanded.sals = xmalloc (sizeof (struct symtab_and_line));
|
|
|
|
|
sal.pc = original_pc;
|
|
|
|
|
expanded.sals[0] = sal;
|
|
|
|
|
return expanded;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (original_pc)
|
|
|
|
|
{
|
|
|
|
|
found = 0;
|
|
|
|
|
for (i = 0; i < expanded.nelts; ++i)
|
|
|
|
|
if (expanded.sals[i].pc == original_pc)
|
|
|
|
|
{
|
|
|
|
|
found = 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
gdb_assert (found);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return expanded;
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-22 21:10:05 +02:00
|
|
|
|
/* Add SALS.nelts breakpoints to the breakpoint table. For each
|
|
|
|
|
SALS.sal[i] breakpoint, include the corresponding ADDR_STRING[i]
|
|
|
|
|
value. COND_STRING, if not NULL, specified the condition to be
|
|
|
|
|
used for all breakpoints. Essentially the only case where
|
|
|
|
|
SALS.nelts is not 1 is when we set a breakpoint on an overloaded
|
|
|
|
|
function. In that case, it's still not possible to specify
|
|
|
|
|
separate conditions for different overloaded functions, so
|
|
|
|
|
we take just a single condition string.
|
|
|
|
|
|
2000-01-06 04:07:20 +01:00
|
|
|
|
NOTE: If the function succeeds, the caller is expected to cleanup
|
2007-09-22 21:10:05 +02:00
|
|
|
|
the arrays ADDR_STRING, COND_STRING, and SALS (but not the
|
2000-01-06 04:07:20 +01:00
|
|
|
|
array contents). If the function fails (error() is called), the
|
|
|
|
|
caller is expected to cleanups both the ADDR_STRING, COND_STRING,
|
|
|
|
|
COND and SALS arrays and each of those arrays contents. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
static void
|
2000-01-06 04:07:20 +01:00
|
|
|
|
create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
|
2007-09-22 21:10:05 +02:00
|
|
|
|
char *cond_string,
|
2000-01-06 04:07:20 +01:00
|
|
|
|
enum bptype type, enum bpdisp disposition,
|
2008-05-01 22:35:33 +02:00
|
|
|
|
int thread, int ignore_count,
|
|
|
|
|
struct breakpoint_ops *ops, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-09-22 21:10:05 +02:00
|
|
|
|
int i;
|
|
|
|
|
for (i = 0; i < sals.nelts; ++i)
|
2000-01-06 04:07:20 +01:00
|
|
|
|
{
|
2007-09-24 09:40:32 +02:00
|
|
|
|
struct symtabs_and_lines expanded =
|
|
|
|
|
expand_line_sal_maybe (sals.sals[i]);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
|
2007-09-24 09:40:32 +02:00
|
|
|
|
create_breakpoint (expanded, addr_string[i],
|
2007-09-22 21:10:05 +02:00
|
|
|
|
cond_string, type, disposition,
|
2008-05-01 22:35:33 +02:00
|
|
|
|
thread, ignore_count, ops, from_tty);
|
2000-01-06 04:07:20 +01:00
|
|
|
|
}
|
2008-04-24 12:21:45 +02:00
|
|
|
|
|
|
|
|
|
update_global_location_list ();
|
2000-01-06 04:07:20 +01:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-01-06 04:07:20 +01:00
|
|
|
|
/* Parse ARG which is assumed to be a SAL specification possibly
|
|
|
|
|
followed by conditionals. On return, SALS contains an array of SAL
|
|
|
|
|
addresses found. ADDR_STRING contains a vector of (canonical)
|
|
|
|
|
address strings. ARG points to the end of the SAL. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-06-08 Andrew Cagney <cagney@redhat.com>
* acinclude.m4 (gcc_AC_CHECK_DECL, (gcc_AC_CHECK_DECL): Stolen
from GCC's acinclude.m4.
* configure.in: Check for getopt's delcaration.
* aclocal.m4, config.in, configure: Re-generate.
* main.c (error_init): Delete declaration.
* defs.h (error_init): Declare.
* rs6000-tdep.c (rs6000_fetch_pointer_argument): Make static.
(rs6000_convert_from_func_ptr_addr): Make static.
(_initialize_rs6000_tdep): Add declaration.
* cli/cli-cmds.c (dont_repeat): Delete declaration.
(show_commands, set_verbose, show_history): Delete declaration.
* top.h (set_verbose): Add declaration.
(show_history, set_history, show_commands): Add declaration.
(do_restore_instream_cleanup): Add declaration.
* objc-lang.c (specialcmp): Make static.
(print_object_command): Make static.
(find_objc_msgsend): Make static.
(find_objc_msgcall_submethod_helper): Make static.
(find_objc_msgcall_submethod): Make static.
(_initialize_objc_language): Add declaration.
(find_implementation_from_class): Make static.
(find_implementation): Make static.
* objc-exp.y (yylex): Delete lookup_struct_typedef declaration.
* objc-lang.h (lookup_struct_typedef): Add declaration.
* cli/cli-interp.c (_initialize_cli_interp): Add declaration.
* cli/cli-script.c (clear_hook_in_cleanup): Make static.
(do_restore_user_call_depth): Make static.
(do_restore_instream_cleanup): Delete declaration.
(dont_repeat): Delete declaration.
* cli/cli-decode.c (add_abbrev_cmd): Delete function.
* cli/cli-dump.c (_initialize_cli_dump): Add declaration.
* reggroups.c (_initialize_reggroup): Add declaration.
* cp-support.c (_initialize_cp_support): Add declaration.
* cp-abi.c (_initialize_cp_abi): Add declaration.
* hpacc-abi.c (_initialize_hpacc_abi): Add declaration.
* gnu-v3-abi.c (gnuv3_baseclass_offset): Make static.
(_initialize_gnu_v3_abi): Add declaration.
* gnu-v2-abi.c (gnuv2_value_rtti_type): Make static.
(_initialize_gnu_v2_abi): Add declaration.
* frame-base.c (_initialize_frame_base): Add declaration.
* doublest.c (floatformat_from_length): Make static.
* frame-unwind.c (_initialize_frame_unwind): Add declaration.
* frame.c (create_sentinel_frame): Make static.
(_initialize_frame): Add declaration.
* top.c (do_catch_errors): Make static.
(gdb_rl_operate_and_get_next_completion): Make static.
* typeprint.c: Include "typeprint.h".
* sentinel-frame.c (sentinel_frame_prev_register): Make static.
(sentinel_frame_this_id): Make static.
* p-valprint.c (_initialize_pascal_valprint): Add declaration.
* ui-out.c (make_cleanup_ui_out_begin_end): Delete function.
* dwarf2-frame.c (dwarf2_frame_cache): Make static.
* p-exp.y (push_current_type, pop_current_type): ISO C declaration.
* dwarf2expr.h (dwarf_expr_context): ISO C declaration.
* maint.c (maintenance_print_architecture): Make static.
* signals/signals.c (_initialize_signals): Add declaration.
* std-regs.c (_initialize_frame_reg): Add declaration.
* jv-exp.y (push_variable): ISO C definition.
(push_qualified_expression_name): Ditto.
* memattr.c (_initialize_mem): Add declaration.
* remote.c (remote_check_watch_resources): Make static.
(remote_stopped_by_watchpoint): Make static.
(remote_stopped_data_address): Make static.
* d10v-tdep.c (nr_dmap_regs): Make static.
(a0_regnum): Make static.
(d10v_frame_unwind_cache): Make static.
(d10v_frame_p): Make static.
* osabi.c (show_osabi): Make static.
(_initialize_gdb_osabi): Add extern declaration.
* gdbtypes.c (make_qualified_type): Make static.
(safe_parse_type): Make static.
* macrocmd.c (_initialize_macrocmd): Add extern declaration.
* macrotab.c (macro_bcache_free): Make static.
* interps.c (interp_set_quiet): Make static.
(interpreter_exec_cmd): Make static.
* stack.h (select_frame_command): New file.
* stack.c: Include "stack.h".
(select_frame_command_wrapper): Delete function.
(select_frame_command): Make global.
* infcall.c: Include "infcall.h".
* linespec.c: Include "linespec.h".
* symfile.c (sections_overlap): Make static.
* cp-support.h (cp_initialize_namespace): ISO C declaration.
* charset.c (_initialize_charset): Add missing prototype.
* regcache.c (init_legacy_regcache_descr): Make static.
(do_regcache_xfree): Make static.
(regcache_xfer_part): Make static.
(_initialize_regcache): Add missing prototype.
* breakpoint.c (parse_breakpoint_sals): Make static.
(breakpoint_sals_to_pc): Make static.
* interps.h (clear_interpreter_hooks): ISO C declaration.
* Makefile.in (stack_h): Define.
(stack.o, typeprint.o, mi-main.o): Update dependencies.
(mi-cmd-stack.o, infcall.o, linespec.o): Update dependencies.
Index: mi/ChangeLog
2003-06-08 Andrew Cagney <cagney@redhat.com>
* mi-parse.c (_initialize_mi_parse): Delete function.
* mi-main.c: Include "mi-main.h".
* mi-interp.c (_initialize_mi_interp): Add declaration.
* mi-cmd-stack.c: Include "stack.h".
(select_frame_command_wrapper): Delete extern declaration.
(mi_cmd_stack_select_frame): Replace select_frame_command_wrapper
with select_frame_command.
2003-06-08 20:27:14 +02:00
|
|
|
|
static void
|
2000-01-06 04:07:20 +01:00
|
|
|
|
parse_breakpoint_sals (char **address,
|
|
|
|
|
struct symtabs_and_lines *sals,
|
2004-02-02 22:10:49 +01:00
|
|
|
|
char ***addr_string,
|
|
|
|
|
int *not_found_ptr)
|
2000-01-06 04:07:20 +01:00
|
|
|
|
{
|
|
|
|
|
char *addr_start = *address;
|
|
|
|
|
*addr_string = NULL;
|
|
|
|
|
/* If no arg given, or if first arg is 'if ', use the default
|
|
|
|
|
breakpoint. */
|
|
|
|
|
if ((*address) == NULL
|
|
|
|
|
|| (strncmp ((*address), "if", 2) == 0 && isspace ((*address)[2])))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
if (default_breakpoint_valid)
|
|
|
|
|
{
|
2000-01-06 04:07:20 +01:00
|
|
|
|
struct symtab_and_line sal;
|
2002-10-24 23:02:53 +02:00
|
|
|
|
init_sal (&sal); /* initialize to zeroes */
|
2000-01-06 04:07:20 +01:00
|
|
|
|
sals->sals = (struct symtab_and_line *)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
xmalloc (sizeof (struct symtab_and_line));
|
|
|
|
|
sal.pc = default_breakpoint_address;
|
|
|
|
|
sal.line = default_breakpoint_line;
|
|
|
|
|
sal.symtab = default_breakpoint_symtab;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
sal.section = find_pc_overlay (sal.pc);
|
2000-01-06 04:07:20 +01:00
|
|
|
|
sals->sals[0] = sal;
|
|
|
|
|
sals->nelts = 1;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("No default breakpoint address now."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* Force almost all breakpoints to be in terms of the
|
1999-07-07 22:19:36 +02:00
|
|
|
|
current_source_symtab (which is decode_line_1's default). This
|
|
|
|
|
should produce the results we want almost all of the time while
|
2002-10-17 01:25:32 +02:00
|
|
|
|
leaving default_breakpoint_* alone.
|
|
|
|
|
ObjC: However, don't match an Objective-C method name which
|
|
|
|
|
may have a '+' or '-' succeeded by a '[' */
|
2002-09-20 16:58:59 +02:00
|
|
|
|
|
2002-09-22 22:29:52 +02:00
|
|
|
|
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
|
2002-09-20 16:58:59 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (default_breakpoint_valid
|
2002-09-20 16:58:59 +02:00
|
|
|
|
&& (!cursal.symtab
|
2002-10-17 01:25:32 +02:00
|
|
|
|
|| ((strchr ("+-", (*address)[0]) != NULL)
|
|
|
|
|
&& ((*address)[1] != '['))))
|
2000-01-06 04:07:20 +01:00
|
|
|
|
*sals = decode_line_1 (address, 1, default_breakpoint_symtab,
|
2004-02-02 22:10:49 +01:00
|
|
|
|
default_breakpoint_line, addr_string,
|
|
|
|
|
not_found_ptr);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else
|
2004-02-02 22:10:49 +01:00
|
|
|
|
*sals = decode_line_1 (address, 1, (struct symtab *) NULL, 0,
|
|
|
|
|
addr_string, not_found_ptr);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2000-01-06 04:07:20 +01:00
|
|
|
|
/* For any SAL that didn't have a canonical string, fill one in. */
|
|
|
|
|
if (sals->nelts > 0 && *addr_string == NULL)
|
|
|
|
|
*addr_string = xcalloc (sals->nelts, sizeof (char **));
|
|
|
|
|
if (addr_start != (*address))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2000-01-06 04:07:20 +01:00
|
|
|
|
int i;
|
|
|
|
|
for (i = 0; i < sals->nelts; i++)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2000-01-06 04:07:20 +01:00
|
|
|
|
/* Add the string if not present. */
|
|
|
|
|
if ((*addr_string)[i] == NULL)
|
|
|
|
|
(*addr_string)[i] = savestring (addr_start, (*address) - addr_start);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2000-01-06 04:07:20 +01:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
2000-01-06 04:07:20 +01:00
|
|
|
|
/* Convert each SAL into a real PC. Verify that the PC can be
|
|
|
|
|
inserted as a breakpoint. If it can't throw an error. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-06-08 Andrew Cagney <cagney@redhat.com>
* acinclude.m4 (gcc_AC_CHECK_DECL, (gcc_AC_CHECK_DECL): Stolen
from GCC's acinclude.m4.
* configure.in: Check for getopt's delcaration.
* aclocal.m4, config.in, configure: Re-generate.
* main.c (error_init): Delete declaration.
* defs.h (error_init): Declare.
* rs6000-tdep.c (rs6000_fetch_pointer_argument): Make static.
(rs6000_convert_from_func_ptr_addr): Make static.
(_initialize_rs6000_tdep): Add declaration.
* cli/cli-cmds.c (dont_repeat): Delete declaration.
(show_commands, set_verbose, show_history): Delete declaration.
* top.h (set_verbose): Add declaration.
(show_history, set_history, show_commands): Add declaration.
(do_restore_instream_cleanup): Add declaration.
* objc-lang.c (specialcmp): Make static.
(print_object_command): Make static.
(find_objc_msgsend): Make static.
(find_objc_msgcall_submethod_helper): Make static.
(find_objc_msgcall_submethod): Make static.
(_initialize_objc_language): Add declaration.
(find_implementation_from_class): Make static.
(find_implementation): Make static.
* objc-exp.y (yylex): Delete lookup_struct_typedef declaration.
* objc-lang.h (lookup_struct_typedef): Add declaration.
* cli/cli-interp.c (_initialize_cli_interp): Add declaration.
* cli/cli-script.c (clear_hook_in_cleanup): Make static.
(do_restore_user_call_depth): Make static.
(do_restore_instream_cleanup): Delete declaration.
(dont_repeat): Delete declaration.
* cli/cli-decode.c (add_abbrev_cmd): Delete function.
* cli/cli-dump.c (_initialize_cli_dump): Add declaration.
* reggroups.c (_initialize_reggroup): Add declaration.
* cp-support.c (_initialize_cp_support): Add declaration.
* cp-abi.c (_initialize_cp_abi): Add declaration.
* hpacc-abi.c (_initialize_hpacc_abi): Add declaration.
* gnu-v3-abi.c (gnuv3_baseclass_offset): Make static.
(_initialize_gnu_v3_abi): Add declaration.
* gnu-v2-abi.c (gnuv2_value_rtti_type): Make static.
(_initialize_gnu_v2_abi): Add declaration.
* frame-base.c (_initialize_frame_base): Add declaration.
* doublest.c (floatformat_from_length): Make static.
* frame-unwind.c (_initialize_frame_unwind): Add declaration.
* frame.c (create_sentinel_frame): Make static.
(_initialize_frame): Add declaration.
* top.c (do_catch_errors): Make static.
(gdb_rl_operate_and_get_next_completion): Make static.
* typeprint.c: Include "typeprint.h".
* sentinel-frame.c (sentinel_frame_prev_register): Make static.
(sentinel_frame_this_id): Make static.
* p-valprint.c (_initialize_pascal_valprint): Add declaration.
* ui-out.c (make_cleanup_ui_out_begin_end): Delete function.
* dwarf2-frame.c (dwarf2_frame_cache): Make static.
* p-exp.y (push_current_type, pop_current_type): ISO C declaration.
* dwarf2expr.h (dwarf_expr_context): ISO C declaration.
* maint.c (maintenance_print_architecture): Make static.
* signals/signals.c (_initialize_signals): Add declaration.
* std-regs.c (_initialize_frame_reg): Add declaration.
* jv-exp.y (push_variable): ISO C definition.
(push_qualified_expression_name): Ditto.
* memattr.c (_initialize_mem): Add declaration.
* remote.c (remote_check_watch_resources): Make static.
(remote_stopped_by_watchpoint): Make static.
(remote_stopped_data_address): Make static.
* d10v-tdep.c (nr_dmap_regs): Make static.
(a0_regnum): Make static.
(d10v_frame_unwind_cache): Make static.
(d10v_frame_p): Make static.
* osabi.c (show_osabi): Make static.
(_initialize_gdb_osabi): Add extern declaration.
* gdbtypes.c (make_qualified_type): Make static.
(safe_parse_type): Make static.
* macrocmd.c (_initialize_macrocmd): Add extern declaration.
* macrotab.c (macro_bcache_free): Make static.
* interps.c (interp_set_quiet): Make static.
(interpreter_exec_cmd): Make static.
* stack.h (select_frame_command): New file.
* stack.c: Include "stack.h".
(select_frame_command_wrapper): Delete function.
(select_frame_command): Make global.
* infcall.c: Include "infcall.h".
* linespec.c: Include "linespec.h".
* symfile.c (sections_overlap): Make static.
* cp-support.h (cp_initialize_namespace): ISO C declaration.
* charset.c (_initialize_charset): Add missing prototype.
* regcache.c (init_legacy_regcache_descr): Make static.
(do_regcache_xfree): Make static.
(regcache_xfer_part): Make static.
(_initialize_regcache): Add missing prototype.
* breakpoint.c (parse_breakpoint_sals): Make static.
(breakpoint_sals_to_pc): Make static.
* interps.h (clear_interpreter_hooks): ISO C declaration.
* Makefile.in (stack_h): Define.
(stack.o, typeprint.o, mi-main.o): Update dependencies.
(mi-cmd-stack.o, infcall.o, linespec.o): Update dependencies.
Index: mi/ChangeLog
2003-06-08 Andrew Cagney <cagney@redhat.com>
* mi-parse.c (_initialize_mi_parse): Delete function.
* mi-main.c: Include "mi-main.h".
* mi-interp.c (_initialize_mi_interp): Add declaration.
* mi-cmd-stack.c: Include "stack.h".
(select_frame_command_wrapper): Delete extern declaration.
(mi_cmd_stack_select_frame): Replace select_frame_command_wrapper
with select_frame_command.
2003-06-08 20:27:14 +02:00
|
|
|
|
static void
|
2000-01-06 04:07:20 +01:00
|
|
|
|
breakpoint_sals_to_pc (struct symtabs_and_lines *sals,
|
|
|
|
|
char *address)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
for (i = 0; i < sals->nelts; i++)
|
2007-10-12 18:11:12 +02:00
|
|
|
|
resolve_sal_pc (&sals->sals[i]);
|
2000-01-06 04:07:20 +01:00
|
|
|
|
}
|
|
|
|
|
|
2005-01-14 21:24:20 +01:00
|
|
|
|
static void
|
2004-02-02 22:10:49 +01:00
|
|
|
|
do_captured_parse_breakpoint (struct ui_out *ui, void *data)
|
|
|
|
|
{
|
|
|
|
|
struct captured_parse_breakpoint_args *args = data;
|
|
|
|
|
|
|
|
|
|
parse_breakpoint_sals (args->arg_p, args->sals_p, args->addr_string_p,
|
|
|
|
|
args->not_found_ptr);
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-22 21:10:05 +02:00
|
|
|
|
/* Given TOK, a string specification of condition and thread, as
|
|
|
|
|
accepted by the 'break' command, extract the condition
|
|
|
|
|
string and thread number and set *COND_STRING and *THREAD.
|
|
|
|
|
PC identifies the context at which the condition should be parsed.
|
|
|
|
|
If no condition is found, *COND_STRING is set to NULL.
|
|
|
|
|
If no thread is found, *THREAD is set to -1. */
|
|
|
|
|
static void
|
|
|
|
|
find_condition_and_thread (char *tok, CORE_ADDR pc,
|
|
|
|
|
char **cond_string, int *thread)
|
|
|
|
|
{
|
|
|
|
|
*cond_string = NULL;
|
|
|
|
|
*thread = -1;
|
|
|
|
|
while (tok && *tok)
|
|
|
|
|
{
|
|
|
|
|
char *end_tok;
|
|
|
|
|
int toklen;
|
|
|
|
|
char *cond_start = NULL;
|
|
|
|
|
char *cond_end = NULL;
|
|
|
|
|
while (*tok == ' ' || *tok == '\t')
|
|
|
|
|
tok++;
|
|
|
|
|
|
|
|
|
|
end_tok = tok;
|
|
|
|
|
|
|
|
|
|
while (*end_tok != ' ' && *end_tok != '\t' && *end_tok != '\000')
|
|
|
|
|
end_tok++;
|
|
|
|
|
|
|
|
|
|
toklen = end_tok - tok;
|
|
|
|
|
|
|
|
|
|
if (toklen >= 1 && strncmp (tok, "if", toklen) == 0)
|
|
|
|
|
{
|
|
|
|
|
tok = cond_start = end_tok + 1;
|
|
|
|
|
parse_exp_1 (&tok, block_for_pc (pc), 0);
|
|
|
|
|
cond_end = tok;
|
|
|
|
|
*cond_string = savestring (cond_start,
|
|
|
|
|
cond_end - cond_start);
|
|
|
|
|
}
|
|
|
|
|
else if (toklen >= 1 && strncmp (tok, "thread", toklen) == 0)
|
|
|
|
|
{
|
|
|
|
|
char *tmptok;
|
|
|
|
|
|
|
|
|
|
tok = end_tok + 1;
|
|
|
|
|
tmptok = tok;
|
|
|
|
|
*thread = strtol (tok, &tok, 0);
|
|
|
|
|
if (tok == tmptok)
|
|
|
|
|
error (_("Junk after thread keyword."));
|
|
|
|
|
if (!valid_thread_id (*thread))
|
|
|
|
|
error (_("Unknown thread %d."), *thread);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
error (_("Junk at end of arguments."));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2007-12-14 18:54:48 +01:00
|
|
|
|
/* Set a breakpoint. This function is shared between
|
|
|
|
|
CLI and MI functions for setting a breakpoint.
|
|
|
|
|
This function has two major modes of operations,
|
|
|
|
|
selected by the PARSE_CONDITION_AND_THREAD parameter.
|
|
|
|
|
If non-zero, the function will parse arg, extracting
|
|
|
|
|
breakpoint location, address and thread. Otherwise,
|
|
|
|
|
ARG is just the location of breakpoint, with condition
|
|
|
|
|
and thread specified by the COND_STRING and THREAD
|
|
|
|
|
parameters. */
|
2004-02-02 22:10:49 +01:00
|
|
|
|
|
2008-02-01 17:24:47 +01:00
|
|
|
|
static void
|
2007-12-14 18:54:48 +01:00
|
|
|
|
break_command_really (char *arg, char *cond_string, int thread,
|
2008-01-22 20:43:10 +01:00
|
|
|
|
int parse_condition_and_thread,
|
|
|
|
|
int tempflag, int hardwareflag,
|
|
|
|
|
int ignore_count,
|
|
|
|
|
enum auto_boolean pending_break_support,
|
2008-05-01 22:35:33 +02:00
|
|
|
|
struct breakpoint_ops *ops,
|
2008-01-22 20:43:10 +01:00
|
|
|
|
int from_tty)
|
2000-01-06 04:07:20 +01:00
|
|
|
|
{
|
2005-04-26 07:03:41 +02:00
|
|
|
|
struct gdb_exception e;
|
2000-01-06 04:07:20 +01:00
|
|
|
|
struct symtabs_and_lines sals;
|
2004-02-02 22:10:49 +01:00
|
|
|
|
struct symtab_and_line pending_sal;
|
|
|
|
|
char *copy_arg;
|
|
|
|
|
char *err_msg;
|
2000-01-06 04:07:20 +01:00
|
|
|
|
char *addr_start = arg;
|
|
|
|
|
char **addr_string;
|
|
|
|
|
struct cleanup *old_chain;
|
|
|
|
|
struct cleanup *breakpoint_chain = NULL;
|
2004-02-02 22:10:49 +01:00
|
|
|
|
struct captured_parse_breakpoint_args parse_args;
|
2005-01-14 21:24:20 +01:00
|
|
|
|
int i;
|
2004-02-02 22:10:49 +01:00
|
|
|
|
int pending = 0;
|
|
|
|
|
int not_found = 0;
|
2000-01-06 04:07:20 +01:00
|
|
|
|
|
|
|
|
|
sals.sals = NULL;
|
|
|
|
|
sals.nelts = 0;
|
|
|
|
|
addr_string = NULL;
|
|
|
|
|
|
2004-02-02 22:10:49 +01:00
|
|
|
|
parse_args.arg_p = &arg;
|
|
|
|
|
parse_args.sals_p = &sals;
|
|
|
|
|
parse_args.addr_string_p = &addr_string;
|
|
|
|
|
parse_args.not_found_ptr = ¬_found;
|
|
|
|
|
|
2005-01-14 21:24:20 +01:00
|
|
|
|
e = catch_exception (uiout, do_captured_parse_breakpoint,
|
|
|
|
|
&parse_args, RETURN_MASK_ALL);
|
2004-02-02 22:10:49 +01:00
|
|
|
|
|
|
|
|
|
/* If caller is interested in rc value from parse, set value. */
|
2005-01-14 21:24:20 +01:00
|
|
|
|
switch (e.reason)
|
2004-02-02 22:10:49 +01:00
|
|
|
|
{
|
2005-01-14 21:24:20 +01:00
|
|
|
|
case RETURN_QUIT:
|
2008-02-01 17:24:47 +01:00
|
|
|
|
throw_exception (e);
|
2005-01-14 21:24:20 +01:00
|
|
|
|
case RETURN_ERROR:
|
|
|
|
|
switch (e.error)
|
2004-02-02 22:10:49 +01:00
|
|
|
|
{
|
2005-01-14 21:24:20 +01:00
|
|
|
|
case NOT_FOUND_ERROR:
|
2004-02-02 22:10:49 +01:00
|
|
|
|
|
2005-01-14 21:24:20 +01:00
|
|
|
|
/* If pending breakpoint support is turned off, throw
|
|
|
|
|
error. */
|
2004-02-27 00:46:47 +01:00
|
|
|
|
|
|
|
|
|
if (pending_break_support == AUTO_BOOLEAN_FALSE)
|
2008-02-01 07:47:20 +01:00
|
|
|
|
throw_exception (e);
|
|
|
|
|
|
|
|
|
|
exception_print (gdb_stderr, e);
|
2004-02-27 00:46:47 +01:00
|
|
|
|
|
2005-01-14 21:24:20 +01:00
|
|
|
|
/* If pending breakpoint support is auto query and the user
|
|
|
|
|
selects no, then simply return the error code. */
|
2004-02-27 00:46:47 +01:00
|
|
|
|
if (pending_break_support == AUTO_BOOLEAN_AUTO &&
|
|
|
|
|
!nquery ("Make breakpoint pending on future shared library load? "))
|
2008-02-01 17:24:47 +01:00
|
|
|
|
return;
|
2004-02-27 00:46:47 +01:00
|
|
|
|
|
2005-01-14 21:24:20 +01:00
|
|
|
|
/* At this point, either the user was queried about setting
|
|
|
|
|
a pending breakpoint and selected yes, or pending
|
|
|
|
|
breakpoint behavior is on and thus a pending breakpoint
|
|
|
|
|
is defaulted on behalf of the user. */
|
2004-02-02 22:10:49 +01:00
|
|
|
|
copy_arg = xstrdup (addr_start);
|
|
|
|
|
addr_string = ©_arg;
|
|
|
|
|
sals.nelts = 1;
|
|
|
|
|
sals.sals = &pending_sal;
|
|
|
|
|
pending_sal.pc = 0;
|
|
|
|
|
pending = 1;
|
2005-01-14 21:24:20 +01:00
|
|
|
|
break;
|
|
|
|
|
default:
|
2008-02-01 17:24:47 +01:00
|
|
|
|
throw_exception (e);
|
2004-02-02 22:10:49 +01:00
|
|
|
|
}
|
2005-01-14 21:24:20 +01:00
|
|
|
|
default:
|
|
|
|
|
if (!sals.nelts)
|
2008-02-01 17:24:47 +01:00
|
|
|
|
return;
|
2004-02-02 22:10:49 +01:00
|
|
|
|
}
|
2000-01-06 04:07:20 +01:00
|
|
|
|
|
|
|
|
|
/* Create a chain of things that always need to be cleaned up. */
|
|
|
|
|
old_chain = make_cleanup (null_cleanup, 0);
|
|
|
|
|
|
2004-02-02 22:10:49 +01:00
|
|
|
|
if (!pending)
|
|
|
|
|
{
|
|
|
|
|
/* Make sure that all storage allocated to SALS gets freed. */
|
|
|
|
|
make_cleanup (xfree, sals.sals);
|
|
|
|
|
|
|
|
|
|
/* Cleanup the addr_string array but not its contents. */
|
|
|
|
|
make_cleanup (xfree, addr_string);
|
|
|
|
|
}
|
2000-01-06 04:07:20 +01:00
|
|
|
|
|
|
|
|
|
/* ----------------------------- SNIP -----------------------------
|
|
|
|
|
Anything added to the cleanup chain beyond this point is assumed
|
|
|
|
|
to be part of a breakpoint. If the breakpoint create succeeds
|
|
|
|
|
then the memory is not reclaimed. */
|
|
|
|
|
breakpoint_chain = make_cleanup (null_cleanup, 0);
|
|
|
|
|
|
|
|
|
|
/* Mark the contents of the addr_string for cleanup. These go on
|
|
|
|
|
the breakpoint_chain and only occure if the breakpoint create
|
|
|
|
|
fails. */
|
|
|
|
|
for (i = 0; i < sals.nelts; i++)
|
|
|
|
|
{
|
|
|
|
|
if (addr_string[i] != NULL)
|
2000-12-15 02:01:51 +01:00
|
|
|
|
make_cleanup (xfree, addr_string[i]);
|
2000-01-06 04:07:20 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Resolve all line numbers to PC's and verify that the addresses
|
|
|
|
|
are ok for the target. */
|
2004-02-02 22:10:49 +01:00
|
|
|
|
if (!pending)
|
|
|
|
|
breakpoint_sals_to_pc (&sals, addr_start);
|
2000-01-06 04:07:20 +01:00
|
|
|
|
|
|
|
|
|
/* Verify that condition can be parsed, before setting any
|
|
|
|
|
breakpoints. Allocate a separate condition expression for each
|
|
|
|
|
breakpoint. */
|
2004-02-02 22:10:49 +01:00
|
|
|
|
if (!pending)
|
2000-01-06 04:07:20 +01:00
|
|
|
|
{
|
2008-04-26 07:43:45 +02:00
|
|
|
|
if (parse_condition_and_thread)
|
2007-12-14 18:54:48 +01:00
|
|
|
|
{
|
|
|
|
|
/* Here we only parse 'arg' to separate condition
|
|
|
|
|
from thread number, so parsing in context of first
|
|
|
|
|
sal is OK. When setting the breakpoint we'll
|
|
|
|
|
re-parse it in context of each sal. */
|
|
|
|
|
cond_string = NULL;
|
|
|
|
|
thread = -1;
|
|
|
|
|
find_condition_and_thread (arg, sals.sals[0].pc, &cond_string, &thread);
|
|
|
|
|
if (cond_string)
|
|
|
|
|
make_cleanup (xfree, cond_string);
|
|
|
|
|
}
|
2008-04-26 07:43:45 +02:00
|
|
|
|
else
|
2007-12-14 18:54:48 +01:00
|
|
|
|
{
|
|
|
|
|
/* Create a private copy of condition string. */
|
|
|
|
|
if (cond_string)
|
|
|
|
|
{
|
|
|
|
|
cond_string = xstrdup (cond_string);
|
|
|
|
|
make_cleanup (xfree, cond_string);
|
|
|
|
|
}
|
|
|
|
|
}
|
2007-09-22 21:10:05 +02:00
|
|
|
|
create_breakpoints (sals, addr_string, cond_string,
|
2004-02-02 22:10:49 +01:00
|
|
|
|
hardwareflag ? bp_hardware_breakpoint
|
|
|
|
|
: bp_breakpoint,
|
|
|
|
|
tempflag ? disp_del : disp_donttouch,
|
2008-05-01 22:35:33 +02:00
|
|
|
|
thread, ignore_count, ops, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2004-02-02 22:10:49 +01:00
|
|
|
|
else
|
|
|
|
|
{
|
2007-09-22 21:33:32 +02:00
|
|
|
|
struct symtab_and_line sal = {0};
|
2004-02-02 22:10:49 +01:00
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
|
|
|
|
|
make_cleanup (xfree, copy_arg);
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
b = set_raw_breakpoint_without_location (hardwareflag
|
|
|
|
|
? bp_hardware_breakpoint
|
|
|
|
|
: bp_breakpoint);
|
2004-02-02 22:10:49 +01:00
|
|
|
|
set_breakpoint_count (breakpoint_count + 1);
|
|
|
|
|
b->number = breakpoint_count;
|
2007-12-14 18:54:48 +01:00
|
|
|
|
b->thread = -1;
|
2007-09-22 21:10:05 +02:00
|
|
|
|
b->addr_string = addr_string[0];
|
2007-12-14 18:54:48 +01:00
|
|
|
|
b->cond_string = NULL;
|
2004-02-02 22:10:49 +01:00
|
|
|
|
b->ignore_count = ignore_count;
|
|
|
|
|
b->disposition = tempflag ? disp_del : disp_donttouch;
|
2007-09-23 09:56:22 +02:00
|
|
|
|
b->condition_not_parsed = 1;
|
2008-05-01 22:35:33 +02:00
|
|
|
|
b->ops = ops;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
|
|
|
|
|
update_global_location_list ();
|
2004-02-02 22:10:49 +01:00
|
|
|
|
mention (b);
|
|
|
|
|
}
|
|
|
|
|
|
2000-01-06 04:07:20 +01:00
|
|
|
|
if (sals.nelts > 1)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("Multiple breakpoints were set.\n"
|
|
|
|
|
"Use the \"delete\" command to delete unwanted breakpoints."));
|
2000-01-06 04:07:20 +01:00
|
|
|
|
/* That's it. Discard the cleanups for data inserted into the
|
|
|
|
|
breakpoint. */
|
|
|
|
|
discard_cleanups (breakpoint_chain);
|
|
|
|
|
/* But cleanup everything else. */
|
|
|
|
|
do_cleanups (old_chain);
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2007-12-14 18:54:48 +01:00
|
|
|
|
/* Set a breakpoint.
|
|
|
|
|
ARG is a string describing breakpoint address,
|
|
|
|
|
condition, and thread.
|
|
|
|
|
FLAG specifies if a breakpoint is hardware on,
|
|
|
|
|
and if breakpoint is temporary, using BP_HARDWARE_FLAG
|
|
|
|
|
and BP_TEMPFLAG. */
|
|
|
|
|
|
2008-02-01 17:24:47 +01:00
|
|
|
|
static void
|
2007-12-14 18:54:48 +01:00
|
|
|
|
break_command_1 (char *arg, int flag, int from_tty)
|
2000-01-06 04:07:20 +01:00
|
|
|
|
{
|
2007-12-14 18:54:48 +01:00
|
|
|
|
int hardwareflag = flag & BP_HARDWAREFLAG;
|
|
|
|
|
int tempflag = flag & BP_TEMPFLAG;
|
2000-01-06 04:07:20 +01:00
|
|
|
|
|
2008-02-01 17:24:47 +01:00
|
|
|
|
break_command_really (arg,
|
|
|
|
|
NULL, 0, 1 /* parse arg */,
|
|
|
|
|
tempflag, hardwareflag,
|
|
|
|
|
0 /* Ignore count */,
|
2008-05-01 22:35:33 +02:00
|
|
|
|
pending_break_support,
|
|
|
|
|
NULL /* breakpoint_ops */,
|
|
|
|
|
from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2007-12-14 18:54:48 +01:00
|
|
|
|
|
2008-02-01 17:24:47 +01:00
|
|
|
|
void
|
|
|
|
|
set_breakpoint (char *address, char *condition,
|
2000-01-06 04:07:20 +01:00
|
|
|
|
int hardwareflag, int tempflag,
|
2005-01-13 23:08:27 +01:00
|
|
|
|
int thread, int ignore_count,
|
2008-02-01 17:24:47 +01:00
|
|
|
|
int pending)
|
2000-01-06 04:07:20 +01:00
|
|
|
|
{
|
2008-02-01 17:24:47 +01:00
|
|
|
|
break_command_really (address, condition, thread,
|
|
|
|
|
0 /* condition and thread are valid. */,
|
|
|
|
|
tempflag, hardwareflag,
|
|
|
|
|
ignore_count,
|
|
|
|
|
pending
|
|
|
|
|
? AUTO_BOOLEAN_TRUE : AUTO_BOOLEAN_FALSE,
|
2008-05-01 22:35:33 +02:00
|
|
|
|
NULL, 0);
|
2000-01-06 04:07:20 +01:00
|
|
|
|
}
|
|
|
|
|
|
2008-02-27 21:27:49 +01:00
|
|
|
|
/* Adjust SAL to the first instruction past the function prologue.
|
|
|
|
|
The end of the prologue is determined using the line table from
|
|
|
|
|
the debugging information.
|
|
|
|
|
|
|
|
|
|
If SAL is already past the prologue, then do nothing. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
skip_prologue_sal (struct symtab_and_line *sal)
|
|
|
|
|
{
|
|
|
|
|
struct symbol *sym = find_pc_function (sal->pc);
|
|
|
|
|
struct symtab_and_line start_sal;
|
|
|
|
|
|
|
|
|
|
if (sym == NULL)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
start_sal = find_function_start_sal (sym, 1);
|
|
|
|
|
if (sal->pc < start_sal.pc)
|
|
|
|
|
*sal = start_sal;
|
|
|
|
|
}
|
2000-01-06 04:07:20 +01:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Helper function for break_command_1 and disassemble_command. */
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
resolve_sal_pc (struct symtab_and_line *sal)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
CORE_ADDR pc;
|
|
|
|
|
|
|
|
|
|
if (sal->pc == 0 && sal->symtab != NULL)
|
|
|
|
|
{
|
|
|
|
|
if (!find_line_pc (sal->symtab, sal->line, &pc))
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("No line %d in file \"%s\"."),
|
1999-04-16 03:35:26 +02:00
|
|
|
|
sal->line, sal->symtab->filename);
|
|
|
|
|
sal->pc = pc;
|
2008-02-27 21:27:49 +01:00
|
|
|
|
|
|
|
|
|
/* If this SAL corresponds to a breakpoint inserted using
|
|
|
|
|
a line number, then skip the function prologue if necessary. */
|
|
|
|
|
if (sal->explicit_line)
|
|
|
|
|
skip_prologue_sal (sal);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (sal->section == 0 && sal->symtab != NULL)
|
|
|
|
|
{
|
|
|
|
|
struct blockvector *bv;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
struct block *b;
|
|
|
|
|
struct symbol *sym;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
Support lexical blocks and function bodies that occupy
non-contiguous address ranges.
* addrmap.c, addrmap.h: New files.
* block.h (struct addrmap): New forward declaration.
(struct blockvector): New member, 'map'.
(BLOCKVECTOR_MAP): New accessor macro.
* block.c: #include "addrmap.h"
(blockvector_for_pc_sect): If the blockvector we've found has
an address map, use it instead of searching the blocks.
* buildsym.c: #include "addrmap.h"
(pending_addrmap_obstack, pending_addrmap_interesting): New static
variables.
(really_free_pendings): If we have a pending addrmap, free it too.
(record_block_range): New function.
(make_blockvector): If we have an interesting pending addrmap,
record it in the new blockvector.
(start_symtab, buildsym_init): Assert that there is no pending
addrmap now; we should have cleaned up any addrmaps we'd built
previously.
(end_symtab): If there is a pending addrmap left over that didn't
get included in the blockvector, free it.
* buildsym.h (struct addrmap): New forward declaration.
(record_block_range): New prototype.
* objfiles.c: #include "addrmap.h".
(objfile_relocate): Relocate the blockvector's address map, if
present.
* dwarf2read.c (dwarf2_record_block_ranges): New function.
(read_func_scope, read_lexical_block_scope): Call it.
* Makefile.in (SFILES): Add addrmap.c.
(addrmap_h): New header dependency variable.
(COMMON_OBS): Add addrmap.o.
(addrmap.o): New rule.l
(block.o, objfiles.o, buildsym.o): Depend on $(addrmap_h).
* block.c (blockvector_for_pc, blockvector_for_pc_sect): Return a
pointer to the block, not its index in the blockvector.
(block_for_pc_sect): Use the returned block, instead of looking it
up ourselves.
* block.h (blockvector_for_pc, blockvector_for_pc_sect): Update
declarations.
* breakpoint.c (resolve_sal_pc): Use returned block, instead of
looking it up ourselves.
* stack.c (print_frame_label_vars): Disable function, which
depends on the block's index.
* buildsym.c (finish_block): Return the block we've built.
* buildsym.h (finish_block): Update prototype.
* defs.h (CORE_ADDR_MAX): New constant.
2007-12-05 00:43:57 +01:00
|
|
|
|
bv = blockvector_for_pc_sect (sal->pc, 0, &b, sal->symtab);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (bv != NULL)
|
|
|
|
|
{
|
|
|
|
|
sym = block_function (b);
|
|
|
|
|
if (sym != NULL)
|
|
|
|
|
{
|
|
|
|
|
fixup_symbol_section (sym, sal->symtab->objfile);
|
|
|
|
|
sal->section = SYMBOL_BFD_SECTION (sym);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* It really is worthwhile to have the section, so we'll just
|
1999-07-07 22:19:36 +02:00
|
|
|
|
have to look harder. This case can be executed if we have
|
|
|
|
|
line numbers but no functions (as can happen in assembly
|
|
|
|
|
source). */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
struct minimal_symbol *msym;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
msym = lookup_minimal_symbol_by_pc (sal->pc);
|
|
|
|
|
if (msym)
|
|
|
|
|
sal->section = SYMBOL_BFD_SECTION (msym);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
break_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-11-08 17:43:39 +01:00
|
|
|
|
break_command_1 (arg, 0, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
tbreak_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-11-08 17:43:39 +01:00
|
|
|
|
break_command_1 (arg, BP_TEMPFLAG, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
hbreak_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-11-08 17:43:39 +01:00
|
|
|
|
break_command_1 (arg, BP_HARDWAREFLAG, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
thbreak_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-11-08 17:43:39 +01:00
|
|
|
|
break_command_1 (arg, (BP_TEMPFLAG | BP_HARDWAREFLAG), from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
stop_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Specify the type of breakpoint to set.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Usage: stop in <function | address>\n\
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
stop at <line>\n"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
stopin_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
int badInput = 0;
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (arg == (char *) NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
badInput = 1;
|
|
|
|
|
else if (*arg != '*')
|
|
|
|
|
{
|
|
|
|
|
char *argptr = arg;
|
|
|
|
|
int hasColon = 0;
|
|
|
|
|
|
1999-08-24 00:40:00 +02:00
|
|
|
|
/* look for a ':'. If this is a line number specification, then
|
|
|
|
|
say it is bad, otherwise, it should be an address or
|
|
|
|
|
function/method name */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
while (*argptr && !hasColon)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
hasColon = (*argptr == ':');
|
|
|
|
|
argptr++;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
if (hasColon)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
badInput = (*argptr != ':'); /* Not a class::method */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else
|
1999-07-07 22:19:36 +02:00
|
|
|
|
badInput = isdigit (*arg); /* a simple line number */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (badInput)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Usage: stop in <function | address>\n"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else
|
2007-11-08 17:43:39 +01:00
|
|
|
|
break_command_1 (arg, 0, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
stopat_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
int badInput = 0;
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (arg == (char *) NULL || *arg == '*') /* no line number */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
badInput = 1;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
char *argptr = arg;
|
|
|
|
|
int hasColon = 0;
|
|
|
|
|
|
|
|
|
|
/* look for a ':'. If there is a '::' then get out, otherwise
|
1999-07-07 22:19:36 +02:00
|
|
|
|
it is probably a line number. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
while (*argptr && !hasColon)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
hasColon = (*argptr == ':');
|
|
|
|
|
argptr++;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
if (hasColon)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
badInput = (*argptr == ':'); /* we have class::method */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else
|
1999-07-07 22:19:36 +02:00
|
|
|
|
badInput = !isdigit (*arg); /* not a line number */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (badInput)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Usage: stop at <line>\n"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else
|
2007-11-08 17:43:39 +01:00
|
|
|
|
break_command_1 (arg, 0, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
1999-08-24 00:40:00 +02:00
|
|
|
|
/* accessflag: hw_write: watch write,
|
|
|
|
|
hw_read: watch read,
|
|
|
|
|
hw_access: watch access (read or write) */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
watch_command_1 (char *arg, int accessflag, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-10-01 02:17:58 +02:00
|
|
|
|
struct breakpoint *b, *scope_breakpoint = NULL;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
struct symtab_and_line sal;
|
|
|
|
|
struct expression *exp;
|
|
|
|
|
struct block *exp_valid_block;
|
|
|
|
|
struct value *val, *mark;
|
|
|
|
|
struct frame_info *frame;
|
|
|
|
|
struct frame_info *prev_frame = NULL;
|
|
|
|
|
char *exp_start = NULL;
|
|
|
|
|
char *exp_end = NULL;
|
2007-12-17 13:32:23 +01:00
|
|
|
|
char *tok, *id_tok_start, *end_tok;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
int toklen;
|
|
|
|
|
char *cond_start = NULL;
|
|
|
|
|
char *cond_end = NULL;
|
|
|
|
|
struct expression *cond = NULL;
|
|
|
|
|
int i, other_type_used, target_resources_ok = 0;
|
|
|
|
|
enum bptype bp_type;
|
|
|
|
|
int mem_cnt = 0;
|
2007-12-17 13:32:23 +01:00
|
|
|
|
int thread = -1;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2002-10-24 23:02:53 +02:00
|
|
|
|
init_sal (&sal); /* initialize to zeroes */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2007-12-17 13:32:23 +01:00
|
|
|
|
/* Make sure that we actually have parameters to parse. */
|
|
|
|
|
if (arg != NULL && arg[0] != '\0')
|
|
|
|
|
{
|
|
|
|
|
toklen = strlen (arg); /* Size of argument list. */
|
|
|
|
|
|
|
|
|
|
/* Points tok to the end of the argument list. */
|
|
|
|
|
tok = arg + toklen - 1;
|
|
|
|
|
|
|
|
|
|
/* Go backwards in the parameters list. Skip the last parameter.
|
|
|
|
|
If we're expecting a 'thread <thread_num>' parameter, this should
|
|
|
|
|
be the thread identifier. */
|
|
|
|
|
while (tok > arg && (*tok == ' ' || *tok == '\t'))
|
|
|
|
|
tok--;
|
|
|
|
|
while (tok > arg && (*tok != ' ' && *tok != '\t'))
|
|
|
|
|
tok--;
|
|
|
|
|
|
|
|
|
|
/* Points end_tok to the beginning of the last token. */
|
|
|
|
|
id_tok_start = tok + 1;
|
|
|
|
|
|
|
|
|
|
/* Go backwards in the parameters list. Skip one more parameter.
|
|
|
|
|
If we're expecting a 'thread <thread_num>' parameter, we should
|
|
|
|
|
reach a "thread" token. */
|
|
|
|
|
while (tok > arg && (*tok == ' ' || *tok == '\t'))
|
|
|
|
|
tok--;
|
|
|
|
|
|
|
|
|
|
end_tok = tok;
|
|
|
|
|
|
|
|
|
|
while (tok > arg && (*tok != ' ' && *tok != '\t'))
|
|
|
|
|
tok--;
|
|
|
|
|
|
|
|
|
|
/* Move the pointer forward to skip the whitespace and
|
|
|
|
|
calculate the length of the token. */
|
|
|
|
|
tok++;
|
|
|
|
|
toklen = end_tok - tok;
|
|
|
|
|
|
|
|
|
|
if (toklen >= 1 && strncmp (tok, "thread", toklen) == 0)
|
|
|
|
|
{
|
|
|
|
|
/* At this point we've found a "thread" token, which means
|
|
|
|
|
the user is trying to set a watchpoint that triggers
|
|
|
|
|
only in a specific thread. */
|
|
|
|
|
char *endp;
|
|
|
|
|
|
|
|
|
|
/* Extract the thread ID from the next token. */
|
|
|
|
|
thread = strtol (id_tok_start, &endp, 0);
|
|
|
|
|
|
|
|
|
|
/* Check if the user provided a valid numeric value for the
|
|
|
|
|
thread ID. */
|
|
|
|
|
if (*endp != ' ' && *endp != '\t' && *endp != '\0')
|
|
|
|
|
error (_("Invalid thread ID specification %s."), id_tok_start);
|
|
|
|
|
|
|
|
|
|
/* Check if the thread actually exists. */
|
|
|
|
|
if (!valid_thread_id (thread))
|
|
|
|
|
error (_("Unknown thread %d."), thread);
|
|
|
|
|
|
|
|
|
|
/* Truncate the string and get rid of the thread <thread_num>
|
|
|
|
|
parameter before the parameter list is parsed by the
|
|
|
|
|
evaluate_expression() function. */
|
|
|
|
|
*tok = '\0';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Parse the rest of the arguments. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
innermost_block = NULL;
|
|
|
|
|
exp_start = arg;
|
|
|
|
|
exp = parse_exp_1 (&arg, 0, 0);
|
|
|
|
|
exp_end = arg;
|
|
|
|
|
exp_valid_block = innermost_block;
|
|
|
|
|
mark = value_mark ();
|
2008-03-03 14:24:12 +01:00
|
|
|
|
fetch_watchpoint_value (exp, &val, NULL, NULL);
|
|
|
|
|
if (val != NULL)
|
|
|
|
|
release_value (val);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
tok = arg;
|
|
|
|
|
while (*tok == ' ' || *tok == '\t')
|
|
|
|
|
tok++;
|
|
|
|
|
end_tok = tok;
|
|
|
|
|
|
|
|
|
|
while (*end_tok != ' ' && *end_tok != '\t' && *end_tok != '\000')
|
|
|
|
|
end_tok++;
|
|
|
|
|
|
|
|
|
|
toklen = end_tok - tok;
|
|
|
|
|
if (toklen >= 1 && strncmp (tok, "if", toklen) == 0)
|
|
|
|
|
{
|
|
|
|
|
tok = cond_start = end_tok + 1;
|
|
|
|
|
cond = parse_exp_1 (&tok, 0, 0);
|
|
|
|
|
cond_end = tok;
|
|
|
|
|
}
|
|
|
|
|
if (*tok)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Junk at end of command."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-08-24 00:40:00 +02:00
|
|
|
|
if (accessflag == hw_read)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
bp_type = bp_read_watchpoint;
|
1999-08-24 00:40:00 +02:00
|
|
|
|
else if (accessflag == hw_access)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
bp_type = bp_access_watchpoint;
|
|
|
|
|
else
|
|
|
|
|
bp_type = bp_hardware_watchpoint;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
mem_cnt = can_use_hardware_watchpoint (val);
|
|
|
|
|
if (mem_cnt == 0 && bp_type != bp_hardware_watchpoint)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Expression cannot be implemented with read/access watchpoint."));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (mem_cnt != 0)
|
|
|
|
|
{
|
|
|
|
|
i = hw_watchpoint_used_count (bp_type, &other_type_used);
|
1999-08-24 00:40:00 +02:00
|
|
|
|
target_resources_ok =
|
|
|
|
|
TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_type, i + mem_cnt,
|
|
|
|
|
other_type_used);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (target_resources_ok == 0 && bp_type != bp_hardware_watchpoint)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Target does not support this type of hardware watchpoint."));
|
1999-08-24 00:40:00 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (target_resources_ok < 0 && bp_type != bp_hardware_watchpoint)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Target can only support one kind of HW watchpoint at a time."));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2001-05-11 21:46:35 +02:00
|
|
|
|
/* Change the type of breakpoint to an ordinary watchpoint if a hardware
|
|
|
|
|
watchpoint could not be set. */
|
|
|
|
|
if (!mem_cnt || target_resources_ok <= 0)
|
|
|
|
|
bp_type = bp_watchpoint;
|
|
|
|
|
|
2007-10-01 02:17:58 +02:00
|
|
|
|
frame = block_innermost_frame (exp_valid_block);
|
|
|
|
|
if (frame)
|
|
|
|
|
prev_frame = get_prev_frame (frame);
|
|
|
|
|
else
|
|
|
|
|
prev_frame = NULL;
|
|
|
|
|
|
|
|
|
|
/* If the expression is "local", then set up a "watchpoint scope"
|
|
|
|
|
breakpoint at the point where we've left the scope of the watchpoint
|
|
|
|
|
expression. Create the scope breakpoint before the watchpoint, so
|
|
|
|
|
that we will encounter it first in bpstat_stop_status. */
|
|
|
|
|
if (innermost_block && prev_frame)
|
|
|
|
|
{
|
|
|
|
|
scope_breakpoint = create_internal_breakpoint (get_frame_pc (prev_frame),
|
|
|
|
|
bp_watchpoint_scope);
|
|
|
|
|
|
|
|
|
|
scope_breakpoint->enable_state = bp_enabled;
|
|
|
|
|
|
|
|
|
|
/* Automatically delete the breakpoint when it hits. */
|
|
|
|
|
scope_breakpoint->disposition = disp_del;
|
|
|
|
|
|
|
|
|
|
/* Only break in the proper frame (help with recursion). */
|
|
|
|
|
scope_breakpoint->frame_id = get_frame_id (prev_frame);
|
|
|
|
|
|
|
|
|
|
/* Set the address at which we will stop. */
|
|
|
|
|
scope_breakpoint->loc->requested_address
|
|
|
|
|
= get_frame_pc (prev_frame);
|
|
|
|
|
scope_breakpoint->loc->address
|
|
|
|
|
= adjust_breakpoint_address (scope_breakpoint->loc->requested_address,
|
|
|
|
|
scope_breakpoint->type);
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Now set up the breakpoint. */
|
2001-05-11 21:46:35 +02:00
|
|
|
|
b = set_raw_breakpoint (sal, bp_type);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
set_breakpoint_count (breakpoint_count + 1);
|
|
|
|
|
b->number = breakpoint_count;
|
2007-12-17 13:32:23 +01:00
|
|
|
|
b->thread = thread;
|
2001-08-02 13:58:29 +02:00
|
|
|
|
b->disposition = disp_donttouch;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
b->exp = exp;
|
|
|
|
|
b->exp_valid_block = exp_valid_block;
|
|
|
|
|
b->exp_string = savestring (exp_start, exp_end - exp_start);
|
|
|
|
|
b->val = val;
|
2008-03-03 14:24:12 +01:00
|
|
|
|
b->val_valid = 1;
|
2007-09-22 21:06:59 +02:00
|
|
|
|
b->loc->cond = cond;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (cond_start)
|
|
|
|
|
b->cond_string = savestring (cond_start, cond_end - cond_start);
|
|
|
|
|
else
|
|
|
|
|
b->cond_string = 0;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (frame)
|
2007-10-01 02:17:58 +02:00
|
|
|
|
b->watchpoint_frame = get_frame_id (frame);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else
|
2007-11-28 19:21:30 +01:00
|
|
|
|
b->watchpoint_frame = null_frame_id;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2007-10-01 02:17:58 +02:00
|
|
|
|
if (scope_breakpoint != NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-10-01 02:17:58 +02:00
|
|
|
|
/* The scope breakpoint is related to the watchpoint. We will
|
|
|
|
|
need to act on them together. */
|
|
|
|
|
b->related_breakpoint = scope_breakpoint;
|
|
|
|
|
scope_breakpoint->related_breakpoint = b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2007-10-01 02:17:58 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
value_free_to_mark (mark);
|
|
|
|
|
mention (b);
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Return count of locations need to be watched and can be handled
|
|
|
|
|
in hardware. If the watchpoint can not be handled
|
|
|
|
|
in hardware return zero. */
|
|
|
|
|
|
|
|
|
|
static int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
can_use_hardware_watchpoint (struct value *v)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
int found_memory_cnt = 0;
|
2000-03-21 02:27:34 +01:00
|
|
|
|
struct value *head = v;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Did the user specifically forbid us to use hardware watchpoints? */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (!can_use_hw_watchpoints)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return 0;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-11-02 05:44:47 +01:00
|
|
|
|
/* Make sure that the value of the expression depends only upon
|
|
|
|
|
memory contents, and values computed from them within GDB. If we
|
|
|
|
|
find any register references or function calls, we can't use a
|
|
|
|
|
hardware watchpoint.
|
|
|
|
|
|
|
|
|
|
The idea here is that evaluating an expression generates a series
|
|
|
|
|
of values, one holding the value of every subexpression. (The
|
|
|
|
|
expression a*b+c has five subexpressions: a, b, a*b, c, and
|
|
|
|
|
a*b+c.) GDB's values hold almost enough information to establish
|
|
|
|
|
the criteria given above --- they identify memory lvalues,
|
|
|
|
|
register lvalues, computed values, etcetera. So we can evaluate
|
|
|
|
|
the expression, and then scan the chain of values that leaves
|
|
|
|
|
behind to decide whether we can detect any possible change to the
|
|
|
|
|
expression's final value using only hardware watchpoints.
|
|
|
|
|
|
|
|
|
|
However, I don't think that the values returned by inferior
|
|
|
|
|
function calls are special in any way. So this function may not
|
|
|
|
|
notice that an expression involving an inferior function call
|
|
|
|
|
can't be watched with hardware watchpoints. FIXME. */
|
2005-02-08 02:59:38 +01:00
|
|
|
|
for (; v; v = value_next (v))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-11-02 05:44:47 +01:00
|
|
|
|
if (VALUE_LVAL (v) == lval_memory)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2005-02-02 23:34:36 +01:00
|
|
|
|
if (value_lazy (v))
|
1999-11-02 05:44:47 +01:00
|
|
|
|
/* A lazy memory lvalue is one that GDB never needed to fetch;
|
|
|
|
|
we either just used its address (e.g., `a' in `a.b') or
|
|
|
|
|
we never needed it at all (e.g., `a' in `a,b'). */
|
|
|
|
|
;
|
1999-08-24 00:40:00 +02:00
|
|
|
|
else
|
1999-11-02 05:44:47 +01:00
|
|
|
|
{
|
|
|
|
|
/* Ahh, memory we actually used! Check if we can cover
|
|
|
|
|
it with hardware watchpoints. */
|
2004-11-12 Andrew Cagney <cagney@gnu.org>
* value.h (VALUE_TYPE, VALUE_NEXT, VALUE_OFFSET, VALUE_BITSIZE)
(VALUE_BITPOS): Delete.
(value_type, value_offset, value_bitsize, value_bitpos): Declare.
* value.c (value_type, value_offset, value_bitpos)
(value_bitsize): New functions. Update references.
* arm-tdep.c, gnu-v3-abi.c, hpacc-abi.c, gnu-v2-abi.c: Update.
* f-valprint.c, cp-valprint.c, c-valprint.c: Update.
* ada-valprint.c, typeprint.c, scm-valprint.c, scm-exp.c: Update.
* p-valprint.c, jv-valprint.c, jv-lang.c, varobj.c: Update.
* objc-lang.c, ada-lang.c, std-regs.c, stack.c: Update.
* infcall.c, linespec.c, printcmd.c, valarith.c: Update.
* valops.c, eval.c, findvar.c, breakpoint.c: Update.
* tracepoint.c, ax-gdb.c, mi/mi-main.c, cli/cli-dump.c:
* rs6000-tdep.c, ppc-sysv-tdep.c: Update.
2004-11-12 22:45:08 +01:00
|
|
|
|
struct type *vtype = check_typedef (value_type (v));
|
2000-03-21 02:27:34 +01:00
|
|
|
|
|
|
|
|
|
/* 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))
|
|
|
|
|
{
|
2004-11-12 Andrew Cagney <cagney@gnu.org>
* value.h (VALUE_TYPE, VALUE_NEXT, VALUE_OFFSET, VALUE_BITSIZE)
(VALUE_BITPOS): Delete.
(value_type, value_offset, value_bitsize, value_bitpos): Declare.
* value.c (value_type, value_offset, value_bitpos)
(value_bitsize): New functions. Update references.
* arm-tdep.c, gnu-v3-abi.c, hpacc-abi.c, gnu-v2-abi.c: Update.
* f-valprint.c, cp-valprint.c, c-valprint.c: Update.
* ada-valprint.c, typeprint.c, scm-valprint.c, scm-exp.c: Update.
* p-valprint.c, jv-valprint.c, jv-lang.c, varobj.c: Update.
* objc-lang.c, ada-lang.c, std-regs.c, stack.c: Update.
* infcall.c, linespec.c, printcmd.c, valarith.c: Update.
* valops.c, eval.c, findvar.c, breakpoint.c: Update.
* tracepoint.c, ax-gdb.c, mi/mi-main.c, cli/cli-dump.c:
* rs6000-tdep.c, ppc-sysv-tdep.c: Update.
2004-11-12 22:45:08 +01:00
|
|
|
|
CORE_ADDR vaddr = VALUE_ADDRESS (v) + value_offset (v);
|
|
|
|
|
int len = TYPE_LENGTH (value_type (v));
|
2000-03-21 02:27:34 +01:00
|
|
|
|
|
|
|
|
|
if (!TARGET_REGION_OK_FOR_HW_WATCHPOINT (vaddr, len))
|
|
|
|
|
return 0;
|
|
|
|
|
else
|
|
|
|
|
found_memory_cnt++;
|
|
|
|
|
}
|
1999-11-02 05:44:47 +01:00
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
2005-02-08 05:15:39 +01:00
|
|
|
|
else if (VALUE_LVAL (v) != not_lval
|
|
|
|
|
&& deprecated_value_modifiable (v) == 0)
|
1999-08-24 00:40:00 +02:00
|
|
|
|
return 0; /* ??? What does this represent? */
|
2005-02-08 05:15:39 +01:00
|
|
|
|
else if (VALUE_LVAL (v) == lval_register)
|
1999-08-24 00:40:00 +02:00
|
|
|
|
return 0; /* cannot watch a register with a HW watchpoint */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* The expression itself looks suitable for using a hardware
|
|
|
|
|
watchpoint, but give the target machine a chance to reject it. */
|
|
|
|
|
return found_memory_cnt;
|
|
|
|
|
}
|
|
|
|
|
|
2000-02-03 05:14:45 +01:00
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
watch_command_wrapper (char *arg, int from_tty)
|
2000-02-03 05:14:45 +01:00
|
|
|
|
{
|
|
|
|
|
watch_command (arg, from_tty);
|
|
|
|
|
}
|
2002-01-17 23:15:18 +01:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
watch_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-08-24 00:40:00 +02:00
|
|
|
|
watch_command_1 (arg, hw_write, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2000-02-03 05:14:45 +01:00
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
rwatch_command_wrapper (char *arg, int from_tty)
|
2000-02-03 05:14:45 +01:00
|
|
|
|
{
|
|
|
|
|
rwatch_command (arg, from_tty);
|
|
|
|
|
}
|
2002-01-17 23:15:18 +01:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
rwatch_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-08-24 00:40:00 +02:00
|
|
|
|
watch_command_1 (arg, hw_read, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2000-02-03 05:14:45 +01:00
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
awatch_command_wrapper (char *arg, int from_tty)
|
2000-02-03 05:14:45 +01:00
|
|
|
|
{
|
|
|
|
|
awatch_command (arg, from_tty);
|
|
|
|
|
}
|
2002-01-17 23:15:18 +01:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
awatch_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-08-24 00:40:00 +02:00
|
|
|
|
watch_command_1 (arg, hw_access, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-07-05 19:58:44 +02:00
|
|
|
|
/* Helper routines for the until_command routine in infcmd.c. Here
|
1999-04-16 03:35:26 +02:00
|
|
|
|
because it uses the mechanisms of breakpoints. */
|
|
|
|
|
|
1999-07-05 19:58:44 +02:00
|
|
|
|
/* This function is called by fetch_inferior_event via the
|
|
|
|
|
cmd_continuation pointer, to complete the until command. It takes
|
|
|
|
|
care of cleaning up the temporary breakpoints set up by the until
|
|
|
|
|
command. */
|
1999-09-22 05:28:34 +02:00
|
|
|
|
static void
|
2008-04-24 13:13:44 +02:00
|
|
|
|
until_break_command_continuation (struct continuation_arg *arg, int error)
|
1999-07-05 19:58:44 +02:00
|
|
|
|
{
|
2008-04-24 13:13:44 +02:00
|
|
|
|
delete_breakpoint ((struct breakpoint *)(arg->data.pointer));
|
|
|
|
|
if (arg->next)
|
|
|
|
|
delete_breakpoint ((struct breakpoint *)(arg->next->data.pointer));
|
1999-07-05 19:58:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
void
|
2003-01-15 01:48:38 +01:00
|
|
|
|
until_break_command (char *arg, int from_tty, int anywhere)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
struct symtabs_and_lines sals;
|
|
|
|
|
struct symtab_and_line sal;
|
* frame.c (deprecated_selected_frame): Rename to...
(selected_frame): ...this. Make static.
(get_selected_frame, select_frame): Update.
* frame.h (deprected_select_frame): Delete.
(deprecated_safe_get_selected_frame): Update comments.
* breakpoint.c, cli/cli-cmds.c, f-valprint.c, infcmd.c, inflow.c,
infrun.c, stack.c, tui/tui-disasm.c, tui/tui-source.c,
tui/tui-winsource.c, valops.c, varobj.c, findvar.c, macroscope.c,
parse.c, regcache.h, sh64-tdep.c, tui/tui-hooks.c, tui/tui-win.c,
tui/tui.c: Replace references to deprecated_selected_frame.
2007-02-27 20:46:04 +01:00
|
|
|
|
struct frame_info *frame = get_selected_frame (NULL);
|
|
|
|
|
struct frame_info *prev_frame = get_prev_frame (frame);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
struct breakpoint *breakpoint;
|
2008-04-24 13:13:44 +02:00
|
|
|
|
struct breakpoint *breakpoint2 = NULL;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
struct cleanup *old_chain;
|
2000-01-11 04:07:37 +01:00
|
|
|
|
struct continuation_arg *arg1;
|
2008-04-24 13:13:44 +02:00
|
|
|
|
struct continuation_arg *arg2;
|
2000-01-11 04:07:37 +01:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
clear_proceed_status ();
|
|
|
|
|
|
|
|
|
|
/* Set a breakpoint where the user wants it and at return from
|
|
|
|
|
this function */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (default_breakpoint_valid)
|
|
|
|
|
sals = decode_line_1 (&arg, 1, default_breakpoint_symtab,
|
2003-12-17 22:47:47 +01:00
|
|
|
|
default_breakpoint_line, (char ***) NULL, NULL);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else
|
1999-08-24 00:40:00 +02:00
|
|
|
|
sals = decode_line_1 (&arg, 1, (struct symtab *) NULL,
|
2003-12-17 22:47:47 +01:00
|
|
|
|
0, (char ***) NULL, NULL);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (sals.nelts != 1)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Couldn't get information on specified line."));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
sal = sals.sals[0];
|
2000-12-15 02:01:51 +01:00
|
|
|
|
xfree (sals.sals); /* malloc'd, so freed */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (*arg)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Junk at end of arguments."));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
resolve_sal_pc (&sal);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2003-01-15 01:48:38 +01:00
|
|
|
|
if (anywhere)
|
|
|
|
|
/* If the user told us to continue until a specified location,
|
|
|
|
|
we don't specify a frame at which we need to stop. */
|
|
|
|
|
breakpoint = set_momentary_breakpoint (sal, null_frame_id, bp_until);
|
|
|
|
|
else
|
|
|
|
|
/* Otherwise, specify the current frame, because we want to stop only
|
|
|
|
|
at the very same frame. */
|
* frame.c (deprecated_selected_frame): Rename to...
(selected_frame): ...this. Make static.
(get_selected_frame, select_frame): Update.
* frame.h (deprected_select_frame): Delete.
(deprecated_safe_get_selected_frame): Update comments.
* breakpoint.c, cli/cli-cmds.c, f-valprint.c, infcmd.c, inflow.c,
infrun.c, stack.c, tui/tui-disasm.c, tui/tui-source.c,
tui/tui-winsource.c, valops.c, varobj.c, findvar.c, macroscope.c,
parse.c, regcache.h, sh64-tdep.c, tui/tui-hooks.c, tui/tui-win.c,
tui/tui.c: Replace references to deprecated_selected_frame.
2007-02-27 20:46:04 +01:00
|
|
|
|
breakpoint = set_momentary_breakpoint (sal, get_frame_id (frame),
|
2003-01-15 01:48:38 +01:00
|
|
|
|
bp_until);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2008-04-24 13:13:44 +02:00
|
|
|
|
old_chain = make_cleanup_delete_breakpoint (breakpoint);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-01-15 01:48:38 +01:00
|
|
|
|
/* Keep within the current frame, or in frames called by the current
|
|
|
|
|
one. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (prev_frame)
|
|
|
|
|
{
|
2002-12-17 18:27:45 +01:00
|
|
|
|
sal = find_pc_line (get_frame_pc (prev_frame), 0);
|
|
|
|
|
sal.pc = get_frame_pc (prev_frame);
|
2008-04-24 13:13:44 +02:00
|
|
|
|
breakpoint2 = set_momentary_breakpoint (sal, get_frame_id (prev_frame),
|
|
|
|
|
bp_until);
|
|
|
|
|
make_cleanup_delete_breakpoint (breakpoint2);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
proceed (-1, TARGET_SIGNAL_DEFAULT, 0);
|
2008-04-24 13:13:44 +02:00
|
|
|
|
|
|
|
|
|
/* If we are running asynchronously, and proceed call above has actually
|
|
|
|
|
managed to start the target, arrange for breakpoints to be
|
|
|
|
|
deleted when the target stops. Otherwise, we're already stopped and
|
|
|
|
|
delete breakpoints via cleanup chain. */
|
|
|
|
|
|
|
|
|
|
if (target_can_async_p () && target_executing)
|
|
|
|
|
{
|
|
|
|
|
arg1 =
|
|
|
|
|
(struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
|
|
|
|
|
arg1->next = NULL;
|
|
|
|
|
arg1->data.pointer = breakpoint;
|
|
|
|
|
|
|
|
|
|
if (breakpoint2)
|
|
|
|
|
{
|
|
|
|
|
arg2 = (struct continuation_arg *)
|
|
|
|
|
xmalloc ( sizeof (struct continuation_arg));
|
|
|
|
|
arg2->next = NULL;
|
|
|
|
|
arg2->data.pointer = breakpoint2;
|
|
|
|
|
arg1->next = arg2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
discard_cleanups (old_chain);
|
|
|
|
|
add_continuation (until_break_command_continuation, arg1);
|
|
|
|
|
}
|
|
|
|
|
else
|
1999-07-07 22:19:36 +02:00
|
|
|
|
do_cleanups (old_chain);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2003-01-15 01:48:38 +01:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
ep_skip_leading_whitespace (char **s)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if ((s == NULL) || (*s == NULL))
|
|
|
|
|
return;
|
|
|
|
|
while (isspace (**s))
|
|
|
|
|
*s += 1;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* This function examines a string, and attempts to find a token
|
|
|
|
|
that might be an event name in the leading characters. If a
|
|
|
|
|
possible match is found, a pointer to the last character of
|
|
|
|
|
the token is returned. Else, NULL is returned. */
|
1999-08-24 00:40:00 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
static char *
|
2000-07-30 03:48:28 +02:00
|
|
|
|
ep_find_event_name_end (char *arg)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
char *s = arg;
|
|
|
|
|
char *event_name_end = NULL;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* If we could depend upon the presense of strrpbrk, we'd use that... */
|
|
|
|
|
if (arg == NULL)
|
|
|
|
|
return NULL;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* We break out of the loop when we find a token delimiter.
|
1999-07-07 22:19:36 +02:00
|
|
|
|
Basically, we're looking for alphanumerics and underscores;
|
|
|
|
|
anything else delimites the token. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
while (*s != '\0')
|
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (!isalnum (*s) && (*s != '_'))
|
|
|
|
|
break;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
event_name_end = s;
|
|
|
|
|
s++;
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return event_name_end;
|
|
|
|
|
}
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* This function attempts to parse an optional "if <cond>" clause
|
|
|
|
|
from the arg string. If one is not found, it returns NULL.
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Else, it returns a pointer to the condition string. (It does not
|
|
|
|
|
attempt to evaluate the string against a particular block.) And,
|
|
|
|
|
it updates arg to point to the first character following the parsed
|
|
|
|
|
if clause in the arg string. */
|
1999-08-24 00:40:00 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
static char *
|
2000-07-30 03:48:28 +02:00
|
|
|
|
ep_parse_optional_if_clause (char **arg)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
char *cond_string;
|
|
|
|
|
|
|
|
|
|
if (((*arg)[0] != 'i') || ((*arg)[1] != 'f') || !isspace ((*arg)[2]))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return NULL;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Skip the "if" keyword. */
|
|
|
|
|
(*arg) += 2;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Skip any extra leading whitespace, and record the start of the
|
|
|
|
|
condition string. */
|
|
|
|
|
ep_skip_leading_whitespace (arg);
|
|
|
|
|
cond_string = *arg;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Assume that the condition occupies the remainder of the arg string. */
|
|
|
|
|
(*arg) += strlen (cond_string);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return cond_string;
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* This function attempts to parse an optional filename from the arg
|
|
|
|
|
string. If one is not found, it returns NULL.
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Else, it returns a pointer to the parsed filename. (This function
|
|
|
|
|
makes no attempt to verify that a file of that name exists, or is
|
|
|
|
|
accessible.) And, it updates arg to point to the first character
|
|
|
|
|
following the parsed filename in the arg string.
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Note that clients needing to preserve the returned filename for
|
|
|
|
|
future access should copy it to their own buffers. */
|
|
|
|
|
static char *
|
2000-07-30 03:48:28 +02:00
|
|
|
|
ep_parse_optional_filename (char **arg)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
static char filename[1024];
|
|
|
|
|
char *arg_p = *arg;
|
|
|
|
|
int i;
|
|
|
|
|
char c;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if ((*arg_p == '\0') || isspace (*arg_p))
|
|
|
|
|
return NULL;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
|
|
|
|
for (i = 0;; i++)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
c = *arg_p;
|
|
|
|
|
if (isspace (c))
|
1999-07-07 22:19:36 +02:00
|
|
|
|
c = '\0';
|
1999-04-16 03:35:26 +02:00
|
|
|
|
filename[i] = c;
|
|
|
|
|
if (c == '\0')
|
1999-07-07 22:19:36 +02:00
|
|
|
|
break;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
arg_p++;
|
|
|
|
|
}
|
|
|
|
|
*arg = arg_p;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return filename;
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Commands to deal with catching events, such as signals, exceptions,
|
|
|
|
|
process start/exit, etc. */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
catch_fork, catch_vfork
|
|
|
|
|
}
|
|
|
|
|
catch_fork_kind;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
catch_fork_command_1 (catch_fork_kind fork_kind, char *arg, int tempflag,
|
|
|
|
|
int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
char *cond_string = NULL;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
ep_skip_leading_whitespace (&arg);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* The allowed syntax is:
|
1999-07-07 22:19:36 +02:00
|
|
|
|
catch [v]fork
|
|
|
|
|
catch [v]fork if <cond>
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
First, check if there's an if clause. */
|
|
|
|
|
cond_string = ep_parse_optional_if_clause (&arg);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if ((*arg != '\0') && !isspace (*arg))
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Junk at end of arguments."));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* If this target supports it, create a fork or vfork catchpoint
|
|
|
|
|
and enable reporting of such events. */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
switch (fork_kind)
|
|
|
|
|
{
|
|
|
|
|
case catch_fork:
|
1999-04-16 03:35:26 +02:00
|
|
|
|
create_fork_event_catchpoint (tempflag, cond_string);
|
|
|
|
|
break;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
case catch_vfork:
|
1999-04-16 03:35:26 +02:00
|
|
|
|
create_vfork_event_catchpoint (tempflag, cond_string);
|
|
|
|
|
break;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
default:
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("unsupported or unknown fork kind; cannot catch it"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
break;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
catch_exec_command_1 (char *arg, int tempflag, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
char *cond_string = NULL;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
ep_skip_leading_whitespace (&arg);
|
|
|
|
|
|
|
|
|
|
/* The allowed syntax is:
|
1999-07-07 22:19:36 +02:00
|
|
|
|
catch exec
|
|
|
|
|
catch exec if <cond>
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
First, check if there's an if clause. */
|
|
|
|
|
cond_string = ep_parse_optional_if_clause (&arg);
|
|
|
|
|
|
|
|
|
|
if ((*arg != '\0') && !isspace (*arg))
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Junk at end of arguments."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* If this target supports it, create an exec catchpoint
|
|
|
|
|
and enable reporting of such events. */
|
|
|
|
|
create_exec_event_catchpoint (tempflag, cond_string);
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
catch_load_command_1 (char *arg, int tempflag, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
char *dll_pathname = NULL;
|
|
|
|
|
char *cond_string = NULL;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
ep_skip_leading_whitespace (&arg);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* The allowed syntax is:
|
1999-07-07 22:19:36 +02:00
|
|
|
|
catch load
|
|
|
|
|
catch load if <cond>
|
|
|
|
|
catch load <filename>
|
|
|
|
|
catch load <filename> if <cond>
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
The user is not allowed to specify the <filename> after an
|
|
|
|
|
if clause.
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
We'll ignore the pathological case of a file named "if".
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
First, check if there's an if clause. If so, then there
|
|
|
|
|
cannot be a filename. */
|
|
|
|
|
cond_string = ep_parse_optional_if_clause (&arg);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* If there was an if clause, then there cannot be a filename.
|
|
|
|
|
Else, there might be a filename and an if clause. */
|
|
|
|
|
if (cond_string == NULL)
|
|
|
|
|
{
|
|
|
|
|
dll_pathname = ep_parse_optional_filename (&arg);
|
|
|
|
|
ep_skip_leading_whitespace (&arg);
|
|
|
|
|
cond_string = ep_parse_optional_if_clause (&arg);
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if ((*arg != '\0') && !isspace (*arg))
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Junk at end of arguments."));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Create a load breakpoint that only triggers when a load of
|
|
|
|
|
the specified dll (or any dll, if no pathname was specified)
|
|
|
|
|
occurs. */
|
2001-05-04 06:15:33 +02:00
|
|
|
|
SOLIB_CREATE_CATCH_LOAD_HOOK (PIDGET (inferior_ptid), tempflag,
|
1999-08-24 00:40:00 +02:00
|
|
|
|
dll_pathname, cond_string);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
catch_unload_command_1 (char *arg, int tempflag, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
char *dll_pathname = NULL;
|
|
|
|
|
char *cond_string = NULL;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
ep_skip_leading_whitespace (&arg);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* The allowed syntax is:
|
1999-07-07 22:19:36 +02:00
|
|
|
|
catch unload
|
|
|
|
|
catch unload if <cond>
|
|
|
|
|
catch unload <filename>
|
|
|
|
|
catch unload <filename> if <cond>
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
The user is not allowed to specify the <filename> after an
|
|
|
|
|
if clause.
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
We'll ignore the pathological case of a file named "if".
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
First, check if there's an if clause. If so, then there
|
|
|
|
|
cannot be a filename. */
|
|
|
|
|
cond_string = ep_parse_optional_if_clause (&arg);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* If there was an if clause, then there cannot be a filename.
|
|
|
|
|
Else, there might be a filename and an if clause. */
|
|
|
|
|
if (cond_string == NULL)
|
|
|
|
|
{
|
|
|
|
|
dll_pathname = ep_parse_optional_filename (&arg);
|
|
|
|
|
ep_skip_leading_whitespace (&arg);
|
|
|
|
|
cond_string = ep_parse_optional_if_clause (&arg);
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if ((*arg != '\0') && !isspace (*arg))
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Junk at end of arguments."));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Create an unload breakpoint that only triggers when an unload of
|
|
|
|
|
the specified dll (or any dll, if no pathname was specified)
|
|
|
|
|
occurs. */
|
2001-05-04 06:15:33 +02:00
|
|
|
|
SOLIB_CREATE_CATCH_UNLOAD_HOOK (PIDGET (inferior_ptid), tempflag,
|
1999-08-24 00:40:00 +02:00
|
|
|
|
dll_pathname, cond_string);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2003-04-27 03:11:10 +02:00
|
|
|
|
static enum print_stop_action
|
|
|
|
|
print_exception_catchpoint (struct breakpoint *b)
|
|
|
|
|
{
|
|
|
|
|
annotate_catchpoint (b->number);
|
|
|
|
|
|
|
|
|
|
if (strstr (b->addr_string, "throw") != NULL)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("\nCatchpoint %d (exception thrown)\n"),
|
2003-04-27 03:11:10 +02:00
|
|
|
|
b->number);
|
|
|
|
|
else
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("\nCatchpoint %d (exception caught)\n"),
|
2003-04-27 03:11:10 +02:00
|
|
|
|
b->number);
|
|
|
|
|
|
|
|
|
|
return PRINT_SRC_AND_LOC;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
print_one_exception_catchpoint (struct breakpoint *b, CORE_ADDR *last_addr)
|
|
|
|
|
{
|
|
|
|
|
if (addressprint)
|
|
|
|
|
{
|
|
|
|
|
annotate_field (4);
|
2008-05-01 22:35:33 +02:00
|
|
|
|
if (b->loc == NULL || b->loc->shlib_disabled)
|
|
|
|
|
ui_out_field_string (uiout, "addr", "<PENDING>");
|
|
|
|
|
else
|
|
|
|
|
ui_out_field_core_addr (uiout, "addr", b->loc->address);
|
2003-04-27 03:11:10 +02:00
|
|
|
|
}
|
|
|
|
|
annotate_field (5);
|
2008-05-01 22:35:33 +02:00
|
|
|
|
if (b->loc)
|
|
|
|
|
*last_addr = b->loc->address;
|
2003-04-27 03:11:10 +02:00
|
|
|
|
if (strstr (b->addr_string, "throw") != NULL)
|
|
|
|
|
ui_out_field_string (uiout, "what", "exception throw");
|
|
|
|
|
else
|
|
|
|
|
ui_out_field_string (uiout, "what", "exception catch");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
print_mention_exception_catchpoint (struct breakpoint *b)
|
|
|
|
|
{
|
|
|
|
|
if (strstr (b->addr_string, "throw") != NULL)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Catchpoint %d (throw)"), b->number);
|
2003-04-27 03:11:10 +02:00
|
|
|
|
else
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Catchpoint %d (catch)"), b->number);
|
2003-04-27 03:11:10 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static struct breakpoint_ops gnu_v3_exception_catchpoint_ops = {
|
|
|
|
|
print_exception_catchpoint,
|
|
|
|
|
print_one_exception_catchpoint,
|
|
|
|
|
print_mention_exception_catchpoint
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
handle_gnu_v3_exceptions (int tempflag, char *cond_string,
|
|
|
|
|
enum exception_event_kind ex_event, int from_tty)
|
|
|
|
|
{
|
2008-05-01 22:35:33 +02:00
|
|
|
|
char *trigger_func_name;
|
|
|
|
|
|
2003-04-27 03:11:10 +02:00
|
|
|
|
if (ex_event == EX_EVENT_CATCH)
|
2008-05-01 22:35:33 +02:00
|
|
|
|
trigger_func_name = "__cxa_begin_catch";
|
2003-04-27 03:11:10 +02:00
|
|
|
|
else
|
2008-05-01 22:35:33 +02:00
|
|
|
|
trigger_func_name = "__cxa_throw";
|
2003-04-27 03:11:10 +02:00
|
|
|
|
|
2008-05-01 22:35:33 +02:00
|
|
|
|
break_command_really (trigger_func_name, cond_string, -1,
|
|
|
|
|
0 /* condition and thread are valid. */,
|
|
|
|
|
0, 0,
|
|
|
|
|
0,
|
|
|
|
|
AUTO_BOOLEAN_TRUE /* pending */,
|
|
|
|
|
&gnu_v3_exception_catchpoint_ops, from_tty);
|
2003-04-27 03:11:10 +02:00
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* Deal with "catch catch" and "catch throw" commands */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
catch_exception_command_1 (enum exception_event_kind ex_event, char *arg,
|
|
|
|
|
int tempflag, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
char *cond_string = NULL;
|
|
|
|
|
struct symtab_and_line *sal = NULL;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
ep_skip_leading_whitespace (&arg);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
cond_string = ep_parse_optional_if_clause (&arg);
|
|
|
|
|
|
|
|
|
|
if ((*arg != '\0') && !isspace (*arg))
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Junk at end of arguments."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
if ((ex_event != EX_EVENT_THROW) &&
|
|
|
|
|
(ex_event != EX_EVENT_CATCH))
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Unsupported or unknown exception event; cannot catch it"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-04-27 03:11:10 +02:00
|
|
|
|
if (handle_gnu_v3_exceptions (tempflag, cond_string, ex_event, from_tty))
|
|
|
|
|
return;
|
|
|
|
|
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("Unsupported with this platform/compiler combination."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
* ada-lang.h (ada_find_printable_frame): Remove.
(ada_exception_catchpoint_p, ada_decode_exception_location)
(ada_decode_assert_location): Add declaration.
* ada-lang.c: Add include of annotate.h and valprint.h.
(exception_catchpoint_kind): New enum.
(function_name_from_pc, is_known_support_routine)
(ada_find_printable_frame, ada_unhandled_exception_name_addr)
(ada_exception_name_addr_1, ada_exception_name_addr)
(print_it_exception, print_one_exception, print_mention_exception)
(print_it_catch_exception, print_one_catch_exception)
(print_mention_catch_exception, catch_exception_breakpoint_ops)
(print_it_catch_exception_unhandled)
(print_one_catch_exception_unhandled)
(print_mention_catch_exception_unhandled, print_it_catch_assert)
(print_one_catch_assert, print_mention_catch_assert)
(ada_exception_catchpoint_p, error_breakpoint_runtime_sym_not_found)
(ada_get_next_arg, catch_ada_exception_command_split)
(ada_exception_sym_name, ada_exception_sym_name)
(ada_exception_breakption_ops, ada_exception_catchpoint_cond_string)
(ada_parse_catchpoint_condition, ada_exception_sal)
(ada_decode_exception_location)
(ada_decode_assert_location): New function.
(catch_exception_unhandled_breakpoint_ops): New global variable.
(catch_assert_breakpoint_ops): New global variable.
* breakpoint.c: Add include of ada-lang.h.
(print_one_breakpoint): Do not print the condition for Ada
exception catchpoints.
(create_ada_exception_breakpoint): New function.
(catch_ada_exception_command, catch_assert_command): New function.
(catch_command_1): Add support for the new "catch exception" and
"catch assert" commands.
(_initialize_breakpoint): Add help description for the new catch
commands.
* Makefile.in (ada-lang.o): Add dependency on annotate.h and
valprint.h.
(breakpoint.o): Add dependency on ada-lang.h.
2007-01-04 06:27:31 +01:00
|
|
|
|
/* Create a breakpoint struct for Ada exception catchpoints. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
create_ada_exception_breakpoint (struct symtab_and_line sal,
|
|
|
|
|
char *addr_string,
|
|
|
|
|
char *exp_string,
|
|
|
|
|
char *cond_string,
|
|
|
|
|
struct expression *cond,
|
|
|
|
|
struct breakpoint_ops *ops,
|
|
|
|
|
int tempflag,
|
|
|
|
|
int from_tty)
|
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
|
|
|
|
|
if (from_tty)
|
|
|
|
|
{
|
|
|
|
|
describe_other_breakpoints (sal.pc, sal.section, -1);
|
|
|
|
|
/* FIXME: brobecker/2006-12-28: Actually, re-implement a special
|
|
|
|
|
version for exception catchpoints, because two catchpoints
|
|
|
|
|
used for different exception names will use the same address.
|
|
|
|
|
In this case, a "breakpoint ... also set at..." warning is
|
|
|
|
|
unproductive. Besides. the warning phrasing is also a bit
|
|
|
|
|
inapropriate, we should use the word catchpoint, and tell
|
|
|
|
|
the user what type of catchpoint it is. The above is good
|
|
|
|
|
enough for now, though. */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
b = set_raw_breakpoint (sal, bp_breakpoint);
|
|
|
|
|
set_breakpoint_count (breakpoint_count + 1);
|
|
|
|
|
|
|
|
|
|
b->enable_state = bp_enabled;
|
|
|
|
|
b->disposition = tempflag ? disp_del : disp_donttouch;
|
|
|
|
|
b->number = breakpoint_count;
|
|
|
|
|
b->ignore_count = 0;
|
2007-09-22 21:06:59 +02:00
|
|
|
|
b->loc->cond = cond;
|
* ada-lang.h (ada_find_printable_frame): Remove.
(ada_exception_catchpoint_p, ada_decode_exception_location)
(ada_decode_assert_location): Add declaration.
* ada-lang.c: Add include of annotate.h and valprint.h.
(exception_catchpoint_kind): New enum.
(function_name_from_pc, is_known_support_routine)
(ada_find_printable_frame, ada_unhandled_exception_name_addr)
(ada_exception_name_addr_1, ada_exception_name_addr)
(print_it_exception, print_one_exception, print_mention_exception)
(print_it_catch_exception, print_one_catch_exception)
(print_mention_catch_exception, catch_exception_breakpoint_ops)
(print_it_catch_exception_unhandled)
(print_one_catch_exception_unhandled)
(print_mention_catch_exception_unhandled, print_it_catch_assert)
(print_one_catch_assert, print_mention_catch_assert)
(ada_exception_catchpoint_p, error_breakpoint_runtime_sym_not_found)
(ada_get_next_arg, catch_ada_exception_command_split)
(ada_exception_sym_name, ada_exception_sym_name)
(ada_exception_breakption_ops, ada_exception_catchpoint_cond_string)
(ada_parse_catchpoint_condition, ada_exception_sal)
(ada_decode_exception_location)
(ada_decode_assert_location): New function.
(catch_exception_unhandled_breakpoint_ops): New global variable.
(catch_assert_breakpoint_ops): New global variable.
* breakpoint.c: Add include of ada-lang.h.
(print_one_breakpoint): Do not print the condition for Ada
exception catchpoints.
(create_ada_exception_breakpoint): New function.
(catch_ada_exception_command, catch_assert_command): New function.
(catch_command_1): Add support for the new "catch exception" and
"catch assert" commands.
(_initialize_breakpoint): Add help description for the new catch
commands.
* Makefile.in (ada-lang.o): Add dependency on annotate.h and
valprint.h.
(breakpoint.o): Add dependency on ada-lang.h.
2007-01-04 06:27:31 +01:00
|
|
|
|
b->addr_string = addr_string;
|
|
|
|
|
b->language = language_ada;
|
|
|
|
|
b->cond_string = cond_string;
|
|
|
|
|
b->exp_string = exp_string;
|
|
|
|
|
b->thread = -1;
|
|
|
|
|
b->ops = ops;
|
|
|
|
|
|
|
|
|
|
mention (b);
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
* ada-lang.h (ada_find_printable_frame): Remove.
(ada_exception_catchpoint_p, ada_decode_exception_location)
(ada_decode_assert_location): Add declaration.
* ada-lang.c: Add include of annotate.h and valprint.h.
(exception_catchpoint_kind): New enum.
(function_name_from_pc, is_known_support_routine)
(ada_find_printable_frame, ada_unhandled_exception_name_addr)
(ada_exception_name_addr_1, ada_exception_name_addr)
(print_it_exception, print_one_exception, print_mention_exception)
(print_it_catch_exception, print_one_catch_exception)
(print_mention_catch_exception, catch_exception_breakpoint_ops)
(print_it_catch_exception_unhandled)
(print_one_catch_exception_unhandled)
(print_mention_catch_exception_unhandled, print_it_catch_assert)
(print_one_catch_assert, print_mention_catch_assert)
(ada_exception_catchpoint_p, error_breakpoint_runtime_sym_not_found)
(ada_get_next_arg, catch_ada_exception_command_split)
(ada_exception_sym_name, ada_exception_sym_name)
(ada_exception_breakption_ops, ada_exception_catchpoint_cond_string)
(ada_parse_catchpoint_condition, ada_exception_sal)
(ada_decode_exception_location)
(ada_decode_assert_location): New function.
(catch_exception_unhandled_breakpoint_ops): New global variable.
(catch_assert_breakpoint_ops): New global variable.
* breakpoint.c: Add include of ada-lang.h.
(print_one_breakpoint): Do not print the condition for Ada
exception catchpoints.
(create_ada_exception_breakpoint): New function.
(catch_ada_exception_command, catch_assert_command): New function.
(catch_command_1): Add support for the new "catch exception" and
"catch assert" commands.
(_initialize_breakpoint): Add help description for the new catch
commands.
* Makefile.in (ada-lang.o): Add dependency on annotate.h and
valprint.h.
(breakpoint.o): Add dependency on ada-lang.h.
2007-01-04 06:27:31 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Implement the "catch exception" command. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
catch_ada_exception_command (char *arg, int tempflag, int from_tty)
|
|
|
|
|
{
|
|
|
|
|
struct symtab_and_line sal;
|
|
|
|
|
enum bptype type;
|
|
|
|
|
char *addr_string = NULL;
|
|
|
|
|
char *exp_string = NULL;
|
|
|
|
|
char *cond_string = NULL;
|
|
|
|
|
struct expression *cond = NULL;
|
|
|
|
|
struct breakpoint_ops *ops = NULL;
|
|
|
|
|
|
|
|
|
|
sal = ada_decode_exception_location (arg, &addr_string, &exp_string,
|
|
|
|
|
&cond_string, &cond, &ops);
|
|
|
|
|
create_ada_exception_breakpoint (sal, addr_string, exp_string,
|
|
|
|
|
cond_string, cond, ops, tempflag,
|
|
|
|
|
from_tty);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Implement the "catch assert" command. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
catch_assert_command (char *arg, int tempflag, int from_tty)
|
|
|
|
|
{
|
|
|
|
|
struct symtab_and_line sal;
|
|
|
|
|
char *addr_string = NULL;
|
|
|
|
|
struct breakpoint_ops *ops = NULL;
|
|
|
|
|
|
|
|
|
|
sal = ada_decode_assert_location (arg, &addr_string, &ops);
|
|
|
|
|
create_ada_exception_breakpoint (sal, addr_string, NULL, NULL, NULL, ops,
|
|
|
|
|
tempflag, from_tty);
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
catch_command_1 (char *arg, int tempflag, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* The first argument may be an event name, such as "start" or "load".
|
|
|
|
|
If so, then handle it as such. If it doesn't match an event name,
|
|
|
|
|
then attempt to interpret it as an exception name. (This latter is
|
|
|
|
|
the v4.16-and-earlier GDB meaning of the "catch" command.)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
First, try to find the bounds of what might be an event name. */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
char *arg1_start = arg;
|
|
|
|
|
char *arg1_end;
|
|
|
|
|
int arg1_length;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (arg1_start == NULL)
|
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* Old behaviour was to use pre-v-4.16 syntax */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* catch_throw_command_1 (arg1_start, tempflag, from_tty); */
|
|
|
|
|
/* return; */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* Now, this is not allowed */
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Catch requires an event name."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
arg1_end = ep_find_event_name_end (arg1_start);
|
|
|
|
|
if (arg1_end == NULL)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("catch requires an event"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
arg1_length = arg1_end + 1 - arg1_start;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Try to match what we found against known event names. */
|
|
|
|
|
if (strncmp (arg1_start, "signal", arg1_length) == 0)
|
|
|
|
|
{
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Catch of signal not yet implemented"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "catch", arg1_length) == 0)
|
|
|
|
|
{
|
1999-08-24 00:40:00 +02:00
|
|
|
|
catch_exception_command_1 (EX_EVENT_CATCH, arg1_end + 1,
|
|
|
|
|
tempflag, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "throw", arg1_length) == 0)
|
|
|
|
|
{
|
1999-08-24 00:40:00 +02:00
|
|
|
|
catch_exception_command_1 (EX_EVENT_THROW, arg1_end + 1,
|
|
|
|
|
tempflag, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "thread_start", arg1_length) == 0)
|
|
|
|
|
{
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Catch of thread_start not yet implemented"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "thread_exit", arg1_length) == 0)
|
|
|
|
|
{
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Catch of thread_exit not yet implemented"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "thread_join", arg1_length) == 0)
|
|
|
|
|
{
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Catch of thread_join not yet implemented"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "start", arg1_length) == 0)
|
|
|
|
|
{
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Catch of start not yet implemented"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "exit", arg1_length) == 0)
|
|
|
|
|
{
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Catch of exit not yet implemented"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "fork", arg1_length) == 0)
|
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
catch_fork_command_1 (catch_fork, arg1_end + 1, tempflag, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "vfork", arg1_length) == 0)
|
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
catch_fork_command_1 (catch_vfork, arg1_end + 1, tempflag, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "exec", arg1_length) == 0)
|
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
catch_exec_command_1 (arg1_end + 1, tempflag, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "load", arg1_length) == 0)
|
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
catch_load_command_1 (arg1_end + 1, tempflag, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "unload", arg1_length) == 0)
|
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
catch_unload_command_1 (arg1_end + 1, tempflag, from_tty);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
else if (strncmp (arg1_start, "stop", arg1_length) == 0)
|
|
|
|
|
{
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Catch of stop not yet implemented"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
* ada-lang.h (ada_find_printable_frame): Remove.
(ada_exception_catchpoint_p, ada_decode_exception_location)
(ada_decode_assert_location): Add declaration.
* ada-lang.c: Add include of annotate.h and valprint.h.
(exception_catchpoint_kind): New enum.
(function_name_from_pc, is_known_support_routine)
(ada_find_printable_frame, ada_unhandled_exception_name_addr)
(ada_exception_name_addr_1, ada_exception_name_addr)
(print_it_exception, print_one_exception, print_mention_exception)
(print_it_catch_exception, print_one_catch_exception)
(print_mention_catch_exception, catch_exception_breakpoint_ops)
(print_it_catch_exception_unhandled)
(print_one_catch_exception_unhandled)
(print_mention_catch_exception_unhandled, print_it_catch_assert)
(print_one_catch_assert, print_mention_catch_assert)
(ada_exception_catchpoint_p, error_breakpoint_runtime_sym_not_found)
(ada_get_next_arg, catch_ada_exception_command_split)
(ada_exception_sym_name, ada_exception_sym_name)
(ada_exception_breakption_ops, ada_exception_catchpoint_cond_string)
(ada_parse_catchpoint_condition, ada_exception_sal)
(ada_decode_exception_location)
(ada_decode_assert_location): New function.
(catch_exception_unhandled_breakpoint_ops): New global variable.
(catch_assert_breakpoint_ops): New global variable.
* breakpoint.c: Add include of ada-lang.h.
(print_one_breakpoint): Do not print the condition for Ada
exception catchpoints.
(create_ada_exception_breakpoint): New function.
(catch_ada_exception_command, catch_assert_command): New function.
(catch_command_1): Add support for the new "catch exception" and
"catch assert" commands.
(_initialize_breakpoint): Add help description for the new catch
commands.
* Makefile.in (ada-lang.o): Add dependency on annotate.h and
valprint.h.
(breakpoint.o): Add dependency on ada-lang.h.
2007-01-04 06:27:31 +01:00
|
|
|
|
else if (strncmp (arg1_start, "exception", arg1_length) == 0)
|
|
|
|
|
{
|
|
|
|
|
catch_ada_exception_command (arg1_end + 1, tempflag, from_tty);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (strncmp (arg1_start, "assert", arg1_length) == 0)
|
|
|
|
|
{
|
|
|
|
|
catch_assert_command (arg1_end + 1, tempflag, from_tty);
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* This doesn't appear to be an event name */
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* Pre-v.4.16 behaviour was to treat the argument
|
1999-07-07 22:19:36 +02:00
|
|
|
|
as the name of an exception */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* catch_throw_command_1 (arg1_start, tempflag, from_tty); */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* Now this is not allowed */
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Unknown event kind specified for catch"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
catch_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
catch_command_1 (arg, 0, from_tty);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
tcatch_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
catch_command_1 (arg, 1, from_tty);
|
|
|
|
|
}
|
|
|
|
|
|
2002-04-10 00:33:25 +02:00
|
|
|
|
/* Delete breakpoints by address or line. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
clear_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-11-15 07:28:19 +01:00
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
VEC(breakpoint_p) *found = 0;
|
|
|
|
|
int ix;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
int default_match;
|
|
|
|
|
struct symtabs_and_lines sals;
|
|
|
|
|
struct symtab_and_line sal;
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
if (arg)
|
|
|
|
|
{
|
|
|
|
|
sals = decode_line_spec (arg, 1);
|
|
|
|
|
default_match = 0;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
sals.sals = (struct symtab_and_line *)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
xmalloc (sizeof (struct symtab_and_line));
|
2002-04-10 00:33:25 +02:00
|
|
|
|
make_cleanup (xfree, sals.sals);
|
2002-10-24 23:02:53 +02:00
|
|
|
|
init_sal (&sal); /* initialize to zeroes */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
sal.line = default_breakpoint_line;
|
|
|
|
|
sal.symtab = default_breakpoint_symtab;
|
|
|
|
|
sal.pc = default_breakpoint_address;
|
|
|
|
|
if (sal.symtab == 0)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("No source file specified."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
sals.sals[0] = sal;
|
|
|
|
|
sals.nelts = 1;
|
|
|
|
|
|
|
|
|
|
default_match = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-24 09:40:32 +02:00
|
|
|
|
/* We don't call resolve_sal_pc here. That's not
|
|
|
|
|
as bad as it seems, because all existing breakpoints
|
|
|
|
|
typically have both file/line and pc set. So, if
|
|
|
|
|
clear is given file/line, we can match this to existing
|
|
|
|
|
breakpoint without obtaining pc at all.
|
|
|
|
|
|
|
|
|
|
We only support clearing given the address explicitly
|
|
|
|
|
present in breakpoint table. Say, we've set breakpoint
|
|
|
|
|
at file:line. There were several PC values for that file:line,
|
|
|
|
|
due to optimization, all in one block.
|
|
|
|
|
We've picked one PC value. If "clear" is issued with another
|
|
|
|
|
PC corresponding to the same file:line, the breakpoint won't
|
|
|
|
|
be cleared. We probably can still clear the breakpoint, but
|
|
|
|
|
since the other PC value is never presented to user, user
|
|
|
|
|
can only find it by guessing, and it does not seem important
|
|
|
|
|
to support that. */
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* For each line spec given, delete bps which correspond
|
2002-04-10 00:33:25 +02:00
|
|
|
|
to it. Do it in two passes, solely to preserve the current
|
|
|
|
|
behavior that from_tty is forced true if we delete more than
|
|
|
|
|
one breakpoint. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2002-04-10 00:33:25 +02:00
|
|
|
|
found = NULL;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
for (i = 0; i < sals.nelts; i++)
|
|
|
|
|
{
|
|
|
|
|
/* If exact pc given, clear bpts at that pc.
|
1999-07-07 22:19:36 +02:00
|
|
|
|
If line given (pc == 0), clear all bpts on specified line.
|
|
|
|
|
If defaulting, clear all bpts on default line
|
1999-04-16 03:35:26 +02:00
|
|
|
|
or at default pc.
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
|
|
|
|
defaulting sal.pc != 0 tests to do
|
|
|
|
|
|
|
|
|
|
0 1 pc
|
|
|
|
|
1 1 pc _and_ line
|
|
|
|
|
0 0 line
|
|
|
|
|
1 0 <can't happen> */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
sal = sals.sals[i];
|
|
|
|
|
|
2007-11-15 07:28:19 +01:00
|
|
|
|
/* Find all matching breakpoints and add them to
|
|
|
|
|
'found'. */
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
int match = 0;
|
2002-04-10 00:33:25 +02:00
|
|
|
|
/* Are we going to delete b? */
|
|
|
|
|
if (b->type != bp_none
|
|
|
|
|
&& b->type != bp_watchpoint
|
|
|
|
|
&& b->type != bp_hardware_watchpoint
|
|
|
|
|
&& b->type != bp_read_watchpoint
|
2007-09-23 09:56:22 +02:00
|
|
|
|
&& b->type != bp_access_watchpoint)
|
|
|
|
|
{
|
|
|
|
|
struct bp_location *loc = b->loc;
|
|
|
|
|
for (; loc; loc = loc->next)
|
|
|
|
|
{
|
|
|
|
|
int pc_match = sal.pc
|
|
|
|
|
&& (loc->address == sal.pc)
|
|
|
|
|
&& (!section_is_overlay (loc->section)
|
|
|
|
|
|| loc->section == sal.section);
|
|
|
|
|
int line_match = ((default_match || (0 == sal.pc))
|
|
|
|
|
&& b->source_file != NULL
|
|
|
|
|
&& sal.symtab != NULL
|
|
|
|
|
&& strcmp (b->source_file, sal.symtab->filename) == 0
|
|
|
|
|
&& b->line_number == sal.line);
|
|
|
|
|
if (pc_match || line_match)
|
|
|
|
|
{
|
|
|
|
|
match = 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (match)
|
2007-11-15 07:28:19 +01:00
|
|
|
|
VEC_safe_push(breakpoint_p, found, b);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2002-04-10 00:33:25 +02:00
|
|
|
|
}
|
|
|
|
|
/* Now go thru the 'found' chain and delete them. */
|
2007-11-15 07:28:19 +01:00
|
|
|
|
if (VEC_empty(breakpoint_p, found))
|
2002-04-10 00:33:25 +02:00
|
|
|
|
{
|
|
|
|
|
if (arg)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("No breakpoint at %s."), arg);
|
2002-04-10 00:33:25 +02:00
|
|
|
|
else
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("No breakpoint at this line."));
|
2002-04-10 00:33:25 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2007-11-15 07:28:19 +01:00
|
|
|
|
if (VEC_length(breakpoint_p, found) > 1)
|
2002-04-10 00:33:25 +02:00
|
|
|
|
from_tty = 1; /* Always report if deleted more than one */
|
|
|
|
|
if (from_tty)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
{
|
2007-11-15 07:28:19 +01:00
|
|
|
|
if (VEC_length(breakpoint_p, found) == 1)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_unfiltered (_("Deleted breakpoint "));
|
|
|
|
|
else
|
|
|
|
|
printf_unfiltered (_("Deleted breakpoints "));
|
|
|
|
|
}
|
2002-04-10 00:33:25 +02:00
|
|
|
|
breakpoints_changed ();
|
2007-11-15 07:28:19 +01:00
|
|
|
|
|
|
|
|
|
for (ix = 0; VEC_iterate(breakpoint_p, found, ix, b); ix++)
|
2002-04-10 00:33:25 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (from_tty)
|
2007-11-15 07:28:19 +01:00
|
|
|
|
printf_unfiltered ("%d ", b->number);
|
|
|
|
|
delete_breakpoint (b);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2002-04-10 00:33:25 +02:00
|
|
|
|
if (from_tty)
|
|
|
|
|
putchar_unfiltered ('\n');
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Delete breakpoint in BS if they are `delete' breakpoints and
|
|
|
|
|
all breakpoints that are marked for deletion, whether hit or not.
|
|
|
|
|
This is called after any breakpoint is hit, or after errors. */
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
breakpoint_auto_delete (bpstat bs)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b, *temp;
|
|
|
|
|
|
|
|
|
|
for (; bs; bs = bs->next)
|
2007-09-22 19:49:41 +02:00
|
|
|
|
if (bs->breakpoint_at && bs->breakpoint_at->owner->disposition == disp_del
|
1999-04-16 03:35:26 +02:00
|
|
|
|
&& bs->stop)
|
2007-09-22 19:49:41 +02:00
|
|
|
|
delete_breakpoint (bs->breakpoint_at->owner);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS_SAFE (b, temp)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2001-08-02 13:58:29 +02:00
|
|
|
|
if (b->disposition == disp_del_at_next_stop)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
delete_breakpoint (b);
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
static void
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list (void)
|
2007-09-23 09:56:22 +02:00
|
|
|
|
{
|
2008-04-24 12:21:45 +02:00
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
struct bp_location **next = &bp_location_chain;
|
|
|
|
|
struct bp_location *loc;
|
|
|
|
|
struct bp_location *loc2;
|
|
|
|
|
struct gdb_exception e;
|
|
|
|
|
VEC(bp_location_p) *old_locations = NULL;
|
|
|
|
|
int ret;
|
|
|
|
|
int ix;
|
|
|
|
|
|
|
|
|
|
/* Store old locations for future reference. */
|
|
|
|
|
for (loc = bp_location_chain; loc; loc = loc->global_next)
|
|
|
|
|
VEC_safe_push (bp_location_p, old_locations, loc);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
bp_location_chain = NULL;
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
2007-09-23 09:56:22 +02:00
|
|
|
|
{
|
2008-04-24 12:21:45 +02:00
|
|
|
|
for (loc = b->loc; loc; loc = loc->next)
|
2007-09-23 09:56:22 +02:00
|
|
|
|
{
|
2008-04-24 12:21:45 +02:00
|
|
|
|
*next = loc;
|
|
|
|
|
next = &(loc->global_next);
|
|
|
|
|
*next = NULL;
|
2007-09-23 09:56:22 +02:00
|
|
|
|
}
|
2008-04-24 12:21:45 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Identify bp_location instances that are no longer present in the new
|
|
|
|
|
list, and therefore should be freed. Note that it's not necessary that
|
|
|
|
|
those locations should be removed from inferior -- if there's another
|
|
|
|
|
location at the same address (previously marked as duplicate),
|
|
|
|
|
we don't need to remove/insert the location. */
|
|
|
|
|
for (ix = 0; VEC_iterate(bp_location_p, old_locations, ix, loc); ++ix)
|
|
|
|
|
{
|
|
|
|
|
/* Tells if 'loc' is found amoung the new locations. If not, we
|
|
|
|
|
have to free it. */
|
|
|
|
|
int found_object = 0;
|
|
|
|
|
for (loc2 = bp_location_chain; loc2; loc2 = loc2->global_next)
|
|
|
|
|
if (loc2 == loc)
|
|
|
|
|
{
|
|
|
|
|
found_object = 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* If this location is no longer present, and inserted, look if there's
|
|
|
|
|
maybe a new location at the same address. If so, mark that one
|
|
|
|
|
inserted, and don't remove this one. This is needed so that we
|
|
|
|
|
don't have a time window where a breakpoint at certain location is not
|
|
|
|
|
inserted. */
|
|
|
|
|
|
|
|
|
|
if (loc->inserted)
|
2007-09-23 09:56:22 +02:00
|
|
|
|
{
|
2008-04-24 12:21:45 +02:00
|
|
|
|
/* If the location is inserted now, we might have to remove it. */
|
|
|
|
|
int keep = 0;
|
|
|
|
|
|
|
|
|
|
if (found_object && should_be_inserted (loc))
|
|
|
|
|
{
|
|
|
|
|
/* The location is still present in the location list, and still
|
|
|
|
|
should be inserted. Don't do anything. */
|
|
|
|
|
keep = 1;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* The location is either no longer present, or got disabled.
|
|
|
|
|
See if there's another location at the same address, in which
|
|
|
|
|
case we don't need to remove this one from the target. */
|
|
|
|
|
if (breakpoint_address_is_meaningful (loc->owner))
|
|
|
|
|
for (loc2 = bp_location_chain; loc2; loc2 = loc2->global_next)
|
|
|
|
|
{
|
|
|
|
|
/* For the sake of should_insert_location. The
|
|
|
|
|
call to check_duplicates will fix up this later. */
|
|
|
|
|
loc2->duplicate = 0;
|
|
|
|
|
if (should_be_inserted (loc2)
|
|
|
|
|
&& loc2 != loc && loc2->address == loc->address)
|
|
|
|
|
{
|
|
|
|
|
loc2->inserted = 1;
|
|
|
|
|
loc2->target_info = loc->target_info;
|
|
|
|
|
keep = 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!keep)
|
|
|
|
|
if (remove_breakpoint (loc, mark_uninserted))
|
|
|
|
|
{
|
|
|
|
|
/* This is just about all we can do. We could keep this
|
|
|
|
|
location on the global list, and try to remove it next
|
|
|
|
|
time, but there's no particular reason why we will
|
|
|
|
|
succeed next time.
|
|
|
|
|
|
|
|
|
|
Note that at this point, loc->owner is still valid,
|
|
|
|
|
as delete_breakpoint frees the breakpoint only
|
|
|
|
|
after calling us. */
|
|
|
|
|
printf_filtered (_("warning: Error removing breakpoint %d\n"),
|
|
|
|
|
loc->owner->number);
|
|
|
|
|
}
|
2007-09-23 09:56:22 +02:00
|
|
|
|
}
|
2008-04-24 12:21:45 +02:00
|
|
|
|
|
|
|
|
|
if (!found_object)
|
|
|
|
|
free_bp_location (loc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
{
|
|
|
|
|
check_duplicates (b);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
}
|
2008-04-24 12:21:45 +02:00
|
|
|
|
|
|
|
|
|
if (always_inserted_mode && target_has_execution)
|
|
|
|
|
insert_breakpoint_locations ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
update_global_location_list_nothrow (void)
|
|
|
|
|
{
|
|
|
|
|
struct gdb_exception e;
|
|
|
|
|
TRY_CATCH (e, RETURN_MASK_ERROR)
|
|
|
|
|
update_global_location_list ();
|
2007-09-23 09:56:22 +02:00
|
|
|
|
}
|
|
|
|
|
|
1999-08-24 00:40:00 +02:00
|
|
|
|
/* Delete a breakpoint and clean up all traces of it in the data
|
|
|
|
|
structures. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
delete_breakpoint (struct breakpoint *bpt)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
bpstat bs;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
struct bp_location *loc, *next;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
gdb_assert (bpt != NULL);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Has this bp already been deleted? This can happen because multiple
|
|
|
|
|
lists can hold pointers to bp's. bpstat lists are especial culprits.
|
|
|
|
|
|
|
|
|
|
One example of this happening is a watchpoint's scope bp. When the
|
|
|
|
|
scope bp triggers, we notice that the watchpoint is out of scope, and
|
|
|
|
|
delete it. We also delete its scope bp. But the scope bp is marked
|
|
|
|
|
"auto-deleting", and is already on a bpstat. That bpstat is then
|
|
|
|
|
checked for auto-deleting bp's, which are deleted.
|
|
|
|
|
|
|
|
|
|
A real solution to this problem might involve reference counts in bp's,
|
|
|
|
|
and/or giving them pointers back to their referencing bpstat's, and
|
|
|
|
|
teaching delete_breakpoint to only free a bp's storage when no more
|
2005-01-14 00:35:54 +01:00
|
|
|
|
references were extent. A cheaper bandaid was chosen. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (bpt->type == bp_none)
|
|
|
|
|
return;
|
|
|
|
|
|
2004-04-21 Andrew Cagney <cagney@redhat.com>
* annotate.h (deprecated_annotate_starting_hook)
(deprecated_annotate_stopped_hook)
(deprecated_annotate_exited_hook)
(deprecated_annotate_signal_hook)
(deprecated_annotate_signalled_hook): Deprecate.
* tracepoint.h (deprecated_create_tracepoint_hook)
(deprecated_delete_tracepoint_hook)
(deprecated_modify_tracepoint_hook)
(deprecated_trace_find_hook)
(deprecated_trace_start_stop_hook): Deprecate.
* target.h (deprecated_target_new_objfile_hook): Deprecate.
* remote.h (deprecated_target_resume_hook)
(deprecated_target_wait_loop_hook): Deprecate.
* gdbcore.h (deprecated_exec_file_display_hook)
(deprecated_file_changed_hook): Deprecate.
* frame.h (deprecated_selected_frame_level_changed_hook): Deprecate.
* defs.h (deprecated_modify_breakpoint_hook)
(deprecated_command_loop_hook, deprecated_show_load_progress)
(deprecated_print_frame_info_listing_hook)
(deprecated_query_hook, deprecated_warning_hook)
(deprecated_flush_hook, deprecated_create_breakpoint_hook)
(deprecated_delete_breakpoint_hook)
(deprecated_interactive_hook, deprecated_registers_changed_hook)
(deprecated_readline_begin_hook, deprecated_readline_hook)
(deprecated_readline_end_hook, deprecated_register_changed_hook)
(deprecated_memory_changed_hook, deprecated_init_ui_hook)
(deprecated_context_hook, deprecated_target_wait_hook)
(deprecated_attach_hook, deprecated_detach_hook)
(deprecated_call_command_hook, deprecated_set_hook)
(deprecated_error_hook, deprecated_error_begin_hook)
(deprecated_ui_load_progress_hook): Deprecate.
* valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update.
* tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update.
* target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update.
* remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update.
* main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update.
* exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update.
* annotate.c, aix-thread.c: Update.
2004-04-22 01:52:21 +02:00
|
|
|
|
if (deprecated_delete_breakpoint_hook)
|
|
|
|
|
deprecated_delete_breakpoint_hook (bpt);
|
1999-08-31 03:14:27 +02:00
|
|
|
|
breakpoint_delete_event (bpt->number);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
if (breakpoint_chain == bpt)
|
|
|
|
|
breakpoint_chain = bpt->next;
|
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->next == bpt)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
b->next = bpt->next;
|
|
|
|
|
break;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
free_command_lines (&bpt->commands);
|
|
|
|
|
if (bpt->cond_string != NULL)
|
2000-12-15 02:01:51 +01:00
|
|
|
|
xfree (bpt->cond_string);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (bpt->addr_string != NULL)
|
2000-12-15 02:01:51 +01:00
|
|
|
|
xfree (bpt->addr_string);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (bpt->exp != NULL)
|
2000-12-15 02:01:51 +01:00
|
|
|
|
xfree (bpt->exp);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (bpt->exp_string != NULL)
|
2000-12-15 02:01:51 +01:00
|
|
|
|
xfree (bpt->exp_string);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (bpt->val != NULL)
|
|
|
|
|
value_free (bpt->val);
|
|
|
|
|
if (bpt->source_file != NULL)
|
2000-12-15 02:01:51 +01:00
|
|
|
|
xfree (bpt->source_file);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (bpt->dll_pathname != NULL)
|
2000-12-15 02:01:51 +01:00
|
|
|
|
xfree (bpt->dll_pathname);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (bpt->triggered_dll_pathname != NULL)
|
2000-12-15 02:01:51 +01:00
|
|
|
|
xfree (bpt->triggered_dll_pathname);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (bpt->exec_pathname != NULL)
|
2000-12-15 02:01:51 +01:00
|
|
|
|
xfree (bpt->exec_pathname);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Be sure no bpstat's are pointing at it after it's been freed. */
|
|
|
|
|
/* FIXME, how can we find all bpstat's?
|
2007-08-17 19:06:04 +02:00
|
|
|
|
We just check stop_bpstat for now. Note that we cannot just
|
|
|
|
|
remove bpstats pointing at bpt from the stop_bpstat list
|
|
|
|
|
entirely, as breakpoint commands are associated with the bpstat;
|
|
|
|
|
if we remove it here, then the later call to
|
|
|
|
|
bpstat_do_actions (&stop_bpstat);
|
|
|
|
|
in event-top.c won't do anything, and temporary breakpoints
|
|
|
|
|
with commands won't work. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
for (bs = stop_bpstat; bs; bs = bs->next)
|
2007-09-22 19:49:41 +02:00
|
|
|
|
if (bs->breakpoint_at && bs->breakpoint_at->owner == bpt)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
bs->breakpoint_at = NULL;
|
|
|
|
|
bs->old_val = NULL;
|
2002-08-27 03:09:09 +02:00
|
|
|
|
/* bs->commands will be freed later. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2008-04-24 12:21:45 +02:00
|
|
|
|
|
|
|
|
|
/* Now that breakpoint is removed from breakpoint
|
|
|
|
|
list, update the global location list. This
|
|
|
|
|
will remove locations that used to belong to
|
|
|
|
|
this breakpoint. Do this before freeing
|
|
|
|
|
the breakpoint itself, since remove_breakpoint
|
|
|
|
|
looks at location's owner. It might be better
|
|
|
|
|
design to have location completely self-contained,
|
|
|
|
|
but it's not the case now. */
|
|
|
|
|
update_global_location_list ();
|
|
|
|
|
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* On the chance that someone will soon try again to delete this same
|
|
|
|
|
bp, we mark it as deleted before freeing its storage. */
|
|
|
|
|
bpt->type = bp_none;
|
|
|
|
|
|
2000-12-15 02:01:51 +01:00
|
|
|
|
xfree (bpt);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2000-05-15 07:54:02 +02:00
|
|
|
|
static void
|
|
|
|
|
do_delete_breakpoint_cleanup (void *b)
|
|
|
|
|
{
|
|
|
|
|
delete_breakpoint (b);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct cleanup *
|
|
|
|
|
make_cleanup_delete_breakpoint (struct breakpoint *b)
|
|
|
|
|
{
|
|
|
|
|
return make_cleanup (do_delete_breakpoint_cleanup, b);
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
delete_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b, *temp;
|
|
|
|
|
|
2002-06-26 07:20:04 +02:00
|
|
|
|
dont_repeat ();
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (arg == 0)
|
|
|
|
|
{
|
|
|
|
|
int breaks_to_delete = 0;
|
|
|
|
|
|
|
|
|
|
/* Delete all breakpoints if no argument.
|
1999-07-07 22:19:36 +02:00
|
|
|
|
Do not delete internal or call-dummy breakpoints, these
|
|
|
|
|
have to be deleted with an explicit breakpoint number argument. */
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
{
|
|
|
|
|
if (b->type != bp_call_dummy &&
|
|
|
|
|
b->type != bp_shlib_event &&
|
1999-12-14 02:06:04 +01:00
|
|
|
|
b->type != bp_thread_event &&
|
2002-02-06 19:31:07 +01:00
|
|
|
|
b->type != bp_overlay_event &&
|
1999-07-07 22:19:36 +02:00
|
|
|
|
b->number >= 0)
|
2007-01-21 18:43:12 +01:00
|
|
|
|
{
|
|
|
|
|
breaks_to_delete = 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Ask user only if there are some breakpoints to delete. */
|
|
|
|
|
if (!from_tty
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
|| (breaks_to_delete && query (_("Delete all breakpoints? "))))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-07-07 22:19:36 +02:00
|
|
|
|
ALL_BREAKPOINTS_SAFE (b, temp)
|
|
|
|
|
{
|
|
|
|
|
if (b->type != bp_call_dummy &&
|
|
|
|
|
b->type != bp_shlib_event &&
|
1999-12-14 02:06:04 +01:00
|
|
|
|
b->type != bp_thread_event &&
|
2002-02-06 19:31:07 +01:00
|
|
|
|
b->type != bp_overlay_event &&
|
1999-07-07 22:19:36 +02:00
|
|
|
|
b->number >= 0)
|
|
|
|
|
delete_breakpoint (b);
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
map_breakpoint_numbers (arg, delete_breakpoint);
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
static int
|
|
|
|
|
all_locations_are_pending (struct bp_location *loc)
|
2007-09-22 21:33:32 +02:00
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
for (; loc; loc = loc->next)
|
|
|
|
|
if (!loc->shlib_disabled)
|
|
|
|
|
return 0;
|
|
|
|
|
return 1;
|
2007-09-22 21:33:32 +02:00
|
|
|
|
}
|
|
|
|
|
|
2008-02-08 01:42:07 +01:00
|
|
|
|
/* Subroutine of update_breakpoint_locations to simplify it.
|
|
|
|
|
Return non-zero if multiple fns in list LOC have the same name.
|
|
|
|
|
Null names are ignored. */
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
ambiguous_names_p (struct bp_location *loc)
|
|
|
|
|
{
|
|
|
|
|
struct bp_location *l;
|
|
|
|
|
htab_t htab = htab_create_alloc (13, htab_hash_string,
|
|
|
|
|
(int (*) (const void *, const void *)) streq,
|
|
|
|
|
NULL, xcalloc, xfree);
|
|
|
|
|
|
|
|
|
|
for (l = loc; l != NULL; l = l->next)
|
|
|
|
|
{
|
|
|
|
|
const char **slot;
|
|
|
|
|
const char *name = l->function_name;
|
|
|
|
|
|
|
|
|
|
/* Allow for some names to be NULL, ignore them. */
|
|
|
|
|
if (name == NULL)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
slot = (const char **) htab_find_slot (htab, (const void *) name,
|
|
|
|
|
INSERT);
|
|
|
|
|
/* NOTE: We can assume slot != NULL here because xcalloc never returns
|
|
|
|
|
NULL. */
|
|
|
|
|
if (*slot != NULL)
|
|
|
|
|
{
|
|
|
|
|
htab_delete (htab);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
*slot = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
htab_delete (htab);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-22 21:33:32 +02:00
|
|
|
|
static void
|
2007-09-23 09:56:22 +02:00
|
|
|
|
update_breakpoint_locations (struct breakpoint *b,
|
|
|
|
|
struct symtabs_and_lines sals)
|
2007-09-22 21:33:32 +02:00
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
char *s;
|
2007-09-23 09:56:22 +02:00
|
|
|
|
struct bp_location *existing_locations = b->loc;
|
|
|
|
|
|
|
|
|
|
/* If there's no new locations, and all existing locations
|
|
|
|
|
are pending, don't do anything. This optimizes
|
|
|
|
|
the common case where all locations are in the same
|
|
|
|
|
shared library, that was unloaded. We'd like to
|
|
|
|
|
retain the location, so that when the library
|
|
|
|
|
is loaded again, we don't loose the enabled/disabled
|
|
|
|
|
status of the individual locations. */
|
|
|
|
|
if (all_locations_are_pending (existing_locations) && sals.nelts == 0)
|
2007-09-22 21:33:32 +02:00
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
b->loc = NULL;
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
for (i = 0; i < sals.nelts; ++i)
|
2007-09-22 21:33:32 +02:00
|
|
|
|
{
|
2007-09-23 09:56:22 +02:00
|
|
|
|
struct bp_location *new_loc =
|
|
|
|
|
add_location_to_breakpoint (b, b->type, &(sals.sals[i]));
|
2007-09-22 21:33:32 +02:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
/* Reparse conditions, they might contain references to the
|
|
|
|
|
old symtab. */
|
|
|
|
|
if (b->cond_string != NULL)
|
|
|
|
|
{
|
|
|
|
|
struct gdb_exception e;
|
2007-09-22 21:33:32 +02:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
s = b->cond_string;
|
|
|
|
|
TRY_CATCH (e, RETURN_MASK_ERROR)
|
|
|
|
|
{
|
|
|
|
|
new_loc->cond = parse_exp_1 (&s, block_for_pc (sals.sals[i].pc),
|
|
|
|
|
0);
|
|
|
|
|
}
|
|
|
|
|
if (e.reason < 0)
|
|
|
|
|
{
|
|
|
|
|
warning (_("failed to reevaluate condition for breakpoint %d: %s"),
|
|
|
|
|
b->number, e.message);
|
|
|
|
|
new_loc->enabled = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
2007-09-22 21:33:32 +02:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (b->source_file != NULL)
|
|
|
|
|
xfree (b->source_file);
|
|
|
|
|
if (sals.sals[i].symtab == NULL)
|
|
|
|
|
b->source_file = NULL;
|
|
|
|
|
else
|
|
|
|
|
b->source_file =
|
|
|
|
|
savestring (sals.sals[i].symtab->filename,
|
|
|
|
|
strlen (sals.sals[i].symtab->filename));
|
2007-09-22 21:33:32 +02:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (b->line_number == 0)
|
|
|
|
|
b->line_number = sals.sals[i].line;
|
|
|
|
|
}
|
2007-09-22 21:33:32 +02:00
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
/* If possible, carry over 'disable' status from existing breakpoints. */
|
|
|
|
|
{
|
|
|
|
|
struct bp_location *e = existing_locations;
|
2008-02-08 01:42:07 +01:00
|
|
|
|
/* If there are multiple breakpoints with the same function name,
|
|
|
|
|
e.g. for inline functions, comparing function names won't work.
|
|
|
|
|
Instead compare pc addresses; this is just a heuristic as things
|
|
|
|
|
may have moved, but in practice it gives the correct answer
|
|
|
|
|
often enough until a better solution is found. */
|
|
|
|
|
int have_ambiguous_names = ambiguous_names_p (b->loc);
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
for (; e; e = e->next)
|
|
|
|
|
{
|
|
|
|
|
if (!e->enabled && e->function_name)
|
|
|
|
|
{
|
|
|
|
|
struct bp_location *l = b->loc;
|
2008-02-08 01:42:07 +01:00
|
|
|
|
if (have_ambiguous_names)
|
|
|
|
|
{
|
|
|
|
|
for (; l; l = l->next)
|
|
|
|
|
if (e->address == l->address)
|
|
|
|
|
{
|
|
|
|
|
l->enabled = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
for (; l; l = l->next)
|
|
|
|
|
if (l->function_name
|
|
|
|
|
&& strcmp (e->function_name, l->function_name) == 0)
|
|
|
|
|
{
|
|
|
|
|
l->enabled = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2007-09-23 09:56:22 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2007-09-22 21:33:32 +02:00
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
2007-09-22 21:33:32 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Reset a breakpoint given it's struct breakpoint * BINT.
|
|
|
|
|
The value we return ends up being the return value from catch_errors.
|
|
|
|
|
Unused in this case. */
|
|
|
|
|
|
|
|
|
|
static int
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
* breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto.
* defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto.
* exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto.
* objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto.
* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
2003-01-18 16:55:53 +01:00
|
|
|
|
breakpoint_re_set_one (void *bint)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
1999-08-24 00:40:00 +02:00
|
|
|
|
/* get past catch_errs */
|
|
|
|
|
struct breakpoint *b = (struct breakpoint *) bint;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
struct value *mark;
|
|
|
|
|
int i;
|
2007-09-22 21:33:32 +02:00
|
|
|
|
int not_found = 0;
|
|
|
|
|
int *not_found_ptr = ¬_found;
|
|
|
|
|
struct symtabs_and_lines sals = {};
|
2007-09-24 09:40:32 +02:00
|
|
|
|
struct symtabs_and_lines expanded;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
char *s;
|
2001-08-02 13:58:29 +02:00
|
|
|
|
enum enable_state save_enable;
|
2007-09-22 21:33:32 +02:00
|
|
|
|
struct gdb_exception e;
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
switch (b->type)
|
|
|
|
|
{
|
|
|
|
|
case bp_none:
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("attempted to reset apparently deleted breakpoint #%d?"),
|
1999-08-24 00:40:00 +02:00
|
|
|
|
b->number);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return 0;
|
|
|
|
|
case bp_breakpoint:
|
|
|
|
|
case bp_hardware_breakpoint:
|
|
|
|
|
case bp_catch_load:
|
|
|
|
|
case bp_catch_unload:
|
|
|
|
|
if (b->addr_string == NULL)
|
|
|
|
|
{
|
|
|
|
|
/* Anything without a string can't be re-set. */
|
|
|
|
|
delete_breakpoint (b);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set_language (b->language);
|
|
|
|
|
input_radix = b->input_radix;
|
|
|
|
|
s = b->addr_string;
|
2007-09-22 21:33:32 +02:00
|
|
|
|
TRY_CATCH (e, RETURN_MASK_ERROR)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-09-22 21:33:32 +02:00
|
|
|
|
sals = decode_line_1 (&s, 1, (struct symtab *) NULL, 0, (char ***) NULL,
|
|
|
|
|
not_found_ptr);
|
|
|
|
|
}
|
|
|
|
|
if (e.reason < 0)
|
|
|
|
|
{
|
|
|
|
|
int not_found_and_ok = 0;
|
|
|
|
|
/* For pending breakpoints, it's expected that parsing
|
|
|
|
|
will fail until the right shared library is loaded.
|
|
|
|
|
User has already told to create pending breakpoints and
|
|
|
|
|
don't need extra messages. If breakpoint is in bp_shlib_disabled
|
|
|
|
|
state, then user already saw the message about that breakpoint
|
|
|
|
|
being disabled, and don't want to see more errors. */
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (not_found
|
|
|
|
|
&& (b->condition_not_parsed
|
|
|
|
|
|| (b->loc && b->loc->shlib_disabled)
|
|
|
|
|
|| b->enable_state == bp_disabled))
|
2007-09-22 21:33:32 +02:00
|
|
|
|
not_found_and_ok = 1;
|
|
|
|
|
|
|
|
|
|
if (!not_found_and_ok)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-09-22 21:33:32 +02:00
|
|
|
|
/* We surely don't want to warn about the same breakpoint
|
|
|
|
|
10 times. One solution, implemented here, is disable
|
|
|
|
|
the breakpoint on error. Another solution would be to
|
|
|
|
|
have separate 'warning emitted' flag. Since this
|
|
|
|
|
happens only when a binary has changed, I don't know
|
|
|
|
|
which approach is better. */
|
|
|
|
|
b->enable_state = bp_disabled;
|
|
|
|
|
throw_exception (e);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2007-09-22 21:33:32 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2007-09-22 21:33:32 +02:00
|
|
|
|
if (not_found)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
gdb_assert (sals.nelts == 1);
|
|
|
|
|
resolve_sal_pc (&sals.sals[0]);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
if (b->condition_not_parsed && s && s[0])
|
2007-09-22 21:33:32 +02:00
|
|
|
|
{
|
|
|
|
|
char *cond_string = 0;
|
|
|
|
|
int thread = -1;
|
|
|
|
|
find_condition_and_thread (s, sals.sals[0].pc,
|
|
|
|
|
&cond_string, &thread);
|
|
|
|
|
if (cond_string)
|
|
|
|
|
b->cond_string = cond_string;
|
|
|
|
|
b->thread = thread;
|
2007-09-23 09:56:22 +02:00
|
|
|
|
b->condition_not_parsed = 0;
|
2007-09-22 21:33:32 +02:00
|
|
|
|
}
|
2007-09-24 09:40:32 +02:00
|
|
|
|
expanded = expand_line_sal_maybe (sals.sals[0]);
|
|
|
|
|
update_breakpoint_locations (b, expanded);
|
2007-09-23 09:56:22 +02:00
|
|
|
|
|
2000-12-15 02:01:51 +01:00
|
|
|
|
xfree (sals.sals);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case bp_watchpoint:
|
|
|
|
|
case bp_hardware_watchpoint:
|
|
|
|
|
case bp_read_watchpoint:
|
|
|
|
|
case bp_access_watchpoint:
|
2008-01-29 17:47:47 +01:00
|
|
|
|
/* Watchpoint can be either on expression using entirely global variables,
|
|
|
|
|
or it can be on local variables.
|
|
|
|
|
|
|
|
|
|
Watchpoints of the first kind are never auto-deleted, and even persist
|
|
|
|
|
across program restarts. Since they can use variables from shared
|
|
|
|
|
libraries, we need to reparse expression as libraries are loaded
|
|
|
|
|
and unloaded.
|
|
|
|
|
|
|
|
|
|
Watchpoints on local variables can also change meaning as result
|
|
|
|
|
of solib event. For example, if a watchpoint uses both a local and
|
|
|
|
|
a global variables in expression, it's a local watchpoint, but
|
|
|
|
|
unloading of a shared library will make the expression invalid.
|
|
|
|
|
This is not a very common use case, but we still re-evaluate
|
|
|
|
|
expression, to avoid surprises to the user.
|
|
|
|
|
|
|
|
|
|
Note that for local watchpoints, we re-evaluate it only if
|
|
|
|
|
watchpoints frame id is still valid. If it's not, it means
|
|
|
|
|
the watchpoint is out of scope and will be deleted soon. In fact,
|
|
|
|
|
I'm not sure we'll ever be called in this case.
|
|
|
|
|
|
|
|
|
|
If a local watchpoint's frame id is still valid, then
|
|
|
|
|
b->exp_valid_block is likewise valid, and we can safely use it.
|
|
|
|
|
|
|
|
|
|
Don't do anything about disabled watchpoints, since they will
|
|
|
|
|
be reevaluated again when enabled. */
|
2008-01-29 18:52:47 +01:00
|
|
|
|
update_watchpoint (b, 1 /* reparse */);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
break;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* We needn't really do anything to reset these, since the mask
|
|
|
|
|
that requests them is unaffected by e.g., new libraries being
|
|
|
|
|
loaded. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
case bp_catch_fork:
|
|
|
|
|
case bp_catch_vfork:
|
|
|
|
|
case bp_catch_exec:
|
|
|
|
|
break;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
default:
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Deleting unknown breakpoint type %d\n"), b->type);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* fall through */
|
2002-02-06 19:31:07 +01:00
|
|
|
|
/* Delete longjmp and overlay event breakpoints; they will be
|
|
|
|
|
reset later by breakpoint_re_set. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
case bp_longjmp:
|
|
|
|
|
case bp_longjmp_resume:
|
2002-02-06 19:31:07 +01:00
|
|
|
|
case bp_overlay_event:
|
1999-04-16 03:35:26 +02:00
|
|
|
|
delete_breakpoint (b);
|
|
|
|
|
break;
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* This breakpoint is special, it's set up when the inferior
|
|
|
|
|
starts and we really don't want to touch it. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
case bp_shlib_event:
|
|
|
|
|
|
1999-12-14 02:06:04 +01:00
|
|
|
|
/* Like bp_shlib_event, this breakpoint type is special.
|
|
|
|
|
Once it is set up, we do not want to touch it. */
|
|
|
|
|
case bp_thread_event:
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/* Keep temporary breakpoints, which can be encountered when we step
|
|
|
|
|
over a dlopen call and SOLIB_ADD is resetting the breakpoints.
|
|
|
|
|
Otherwise these should have been blown away via the cleanup chain
|
|
|
|
|
or by breakpoint_init_inferior when we rerun the executable. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
case bp_until:
|
|
|
|
|
case bp_finish:
|
|
|
|
|
case bp_watchpoint_scope:
|
|
|
|
|
case bp_call_dummy:
|
|
|
|
|
case bp_step_resume:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Re-set all breakpoints after symbols have been re-loaded. */
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
breakpoint_re_set (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b, *temp;
|
|
|
|
|
enum language save_language;
|
|
|
|
|
int save_input_radix;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
save_language = current_language->la_language;
|
|
|
|
|
save_input_radix = input_radix;
|
|
|
|
|
ALL_BREAKPOINTS_SAFE (b, temp)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
1999-08-24 00:40:00 +02:00
|
|
|
|
/* Format possible error msg */
|
2007-09-22 21:33:32 +02:00
|
|
|
|
char *message = xstrprintf ("Error in re-setting breakpoint %d: ",
|
2003-08-09 16:57:30 +02:00
|
|
|
|
b->number);
|
|
|
|
|
struct cleanup *cleanups = make_cleanup (xfree, message);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
catch_errors (breakpoint_re_set_one, b, message, RETURN_MASK_ALL);
|
2003-08-09 16:57:30 +02:00
|
|
|
|
do_cleanups (cleanups);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
set_language (save_language);
|
|
|
|
|
input_radix = save_input_radix;
|
|
|
|
|
|
2007-06-06 17:15:34 +02:00
|
|
|
|
if (gdbarch_get_longjmp_target_p (current_gdbarch))
|
2002-02-18 14:35:31 +01:00
|
|
|
|
{
|
|
|
|
|
create_longjmp_breakpoint ("longjmp");
|
|
|
|
|
create_longjmp_breakpoint ("_longjmp");
|
|
|
|
|
create_longjmp_breakpoint ("siglongjmp");
|
|
|
|
|
create_longjmp_breakpoint ("_siglongjmp");
|
|
|
|
|
create_longjmp_breakpoint (NULL);
|
|
|
|
|
}
|
2002-02-06 19:31:07 +01:00
|
|
|
|
|
|
|
|
|
create_overlay_event_breakpoint ("_ovly_debug_event");
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Reset the thread number of this breakpoint:
|
|
|
|
|
|
|
|
|
|
- If the breakpoint is for all threads, leave it as-is.
|
2001-05-04 06:15:33 +02:00
|
|
|
|
- Else, reset it to the current thread for inferior_ptid. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
breakpoint_re_set_thread (struct breakpoint *b)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
if (b->thread != -1)
|
|
|
|
|
{
|
2001-05-04 06:15:33 +02:00
|
|
|
|
if (in_thread_list (inferior_ptid))
|
|
|
|
|
b->thread = pid_to_thread_id (inferior_ptid);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2002-02-02 02:25:28 +01:00
|
|
|
|
/* Set ignore-count of breakpoint number BPTNUM to COUNT.
|
|
|
|
|
If from_tty is nonzero, it prints a message to that effect,
|
|
|
|
|
which ends with a period (no newline). */
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
set_ignore_count (int bptnum, int count, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *b;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
if (count < 0)
|
|
|
|
|
count = 0;
|
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->number == bptnum)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
b->ignore_count = count;
|
2002-06-18 23:58:55 +02:00
|
|
|
|
if (from_tty)
|
|
|
|
|
{
|
|
|
|
|
if (count == 0)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Will stop next time breakpoint %d is reached."),
|
2002-06-18 23:58:55 +02:00
|
|
|
|
bptnum);
|
|
|
|
|
else if (count == 1)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Will ignore next crossing of breakpoint %d."),
|
2002-06-18 23:58:55 +02:00
|
|
|
|
bptnum);
|
|
|
|
|
else
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_filtered (_("Will ignore next %d crossings of breakpoint %d."),
|
2002-06-18 23:58:55 +02:00
|
|
|
|
count, bptnum);
|
|
|
|
|
}
|
1999-07-07 22:19:36 +02:00
|
|
|
|
breakpoints_changed ();
|
2002-06-18 23:58:55 +02:00
|
|
|
|
breakpoint_modify_event (b->number);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
return;
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("No breakpoint number %d."), bptnum);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Clear the ignore counts of all breakpoints. */
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
breakpoint_clear_ignore_counts (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
b->ignore_count = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Command to set ignore-count of breakpoint N to COUNT. */
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
ignore_command (char *args, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
char *p = args;
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
int num;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
if (p == 0)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
error_no_arg (_("a breakpoint number"));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
num = get_number (&p);
|
1999-11-02 05:44:47 +01:00
|
|
|
|
if (num == 0)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("bad breakpoint number: '%s'"), args);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (*p == 0)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Second argument (specified ignore-count) is missing."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
set_ignore_count (num,
|
|
|
|
|
longest_to_int (value_as_long (parse_and_eval (p))),
|
|
|
|
|
from_tty);
|
2002-06-18 23:58:55 +02:00
|
|
|
|
if (from_tty)
|
|
|
|
|
printf_filtered ("\n");
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Call FUNCTION on each of the breakpoints
|
|
|
|
|
whose numbers are given in ARGS. */
|
|
|
|
|
|
|
|
|
|
static void
|
2000-08-03 20:17:58 +02:00
|
|
|
|
map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
char *p = args;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
char *p1;
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
int num;
|
|
|
|
|
struct breakpoint *b, *tmp;
|
1999-11-09 02:23:30 +01:00
|
|
|
|
int match;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
if (p == 0)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
error_no_arg (_("one or more breakpoint numbers"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
while (*p)
|
|
|
|
|
{
|
1999-11-09 02:23:30 +01:00
|
|
|
|
match = 0;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
p1 = p;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-11-02 05:44:47 +01:00
|
|
|
|
num = get_number_or_range (&p1);
|
|
|
|
|
if (num == 0)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("bad breakpoint number at or near '%s'"), p);
|
1999-11-02 05:44:47 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ALL_BREAKPOINTS_SAFE (b, tmp)
|
|
|
|
|
if (b->number == num)
|
|
|
|
|
{
|
|
|
|
|
struct breakpoint *related_breakpoint = b->related_breakpoint;
|
1999-11-09 02:23:30 +01:00
|
|
|
|
match = 1;
|
1999-11-02 05:44:47 +01:00
|
|
|
|
function (b);
|
|
|
|
|
if (related_breakpoint)
|
|
|
|
|
function (related_breakpoint);
|
1999-11-09 02:23:30 +01:00
|
|
|
|
break;
|
1999-11-02 05:44:47 +01:00
|
|
|
|
}
|
1999-11-09 02:23:30 +01:00
|
|
|
|
if (match == 0)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
printf_unfiltered (_("No breakpoint number %d.\n"), num);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
p = p1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-23 09:56:22 +02:00
|
|
|
|
static struct bp_location *
|
|
|
|
|
find_location_by_number (char *number)
|
|
|
|
|
{
|
|
|
|
|
char *dot = strchr (number, '.');
|
|
|
|
|
char *p1;
|
|
|
|
|
int bp_num;
|
|
|
|
|
int loc_num;
|
|
|
|
|
struct breakpoint *b;
|
|
|
|
|
struct bp_location *loc;
|
|
|
|
|
|
|
|
|
|
*dot = '\0';
|
|
|
|
|
|
|
|
|
|
p1 = number;
|
|
|
|
|
bp_num = get_number_or_range (&p1);
|
|
|
|
|
if (bp_num == 0)
|
|
|
|
|
error (_("Bad breakpoint number '%s'"), number);
|
|
|
|
|
|
|
|
|
|
ALL_BREAKPOINTS (b)
|
|
|
|
|
if (b->number == bp_num)
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!b || b->number != bp_num)
|
|
|
|
|
error (_("Bad breakpoint number '%s'"), number);
|
|
|
|
|
|
|
|
|
|
p1 = dot+1;
|
|
|
|
|
loc_num = get_number_or_range (&p1);
|
|
|
|
|
if (loc_num == 0)
|
|
|
|
|
error (_("Bad breakpoint location number '%s'"), number);
|
|
|
|
|
|
|
|
|
|
--loc_num;
|
|
|
|
|
loc = b->loc;
|
|
|
|
|
for (;loc_num && loc; --loc_num, loc = loc->next)
|
|
|
|
|
;
|
|
|
|
|
if (!loc)
|
|
|
|
|
error (_("Bad breakpoint location number '%s'"), dot+1);
|
|
|
|
|
|
|
|
|
|
return loc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2002-02-06 19:31:07 +01:00
|
|
|
|
/* Set ignore-count of breakpoint number BPTNUM to COUNT.
|
|
|
|
|
If from_tty is nonzero, it prints a message to that effect,
|
|
|
|
|
which ends with a period (no newline). */
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
disable_breakpoint (struct breakpoint *bpt)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
/* Never disable a watchpoint scope breakpoint; we want to
|
|
|
|
|
hit them when we leave scope so we can delete both the
|
|
|
|
|
watchpoint and its scope breakpoint at that time. */
|
|
|
|
|
if (bpt->type == bp_watchpoint_scope)
|
|
|
|
|
return;
|
|
|
|
|
|
1999-09-22 05:28:34 +02:00
|
|
|
|
/* You can't disable permanent breakpoints. */
|
2001-08-02 13:58:29 +02:00
|
|
|
|
if (bpt->enable_state == bp_permanent)
|
1999-09-22 05:28:34 +02:00
|
|
|
|
return;
|
|
|
|
|
|
2001-08-02 13:58:29 +02:00
|
|
|
|
bpt->enable_state = bp_disabled;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2004-04-21 Andrew Cagney <cagney@redhat.com>
* annotate.h (deprecated_annotate_starting_hook)
(deprecated_annotate_stopped_hook)
(deprecated_annotate_exited_hook)
(deprecated_annotate_signal_hook)
(deprecated_annotate_signalled_hook): Deprecate.
* tracepoint.h (deprecated_create_tracepoint_hook)
(deprecated_delete_tracepoint_hook)
(deprecated_modify_tracepoint_hook)
(deprecated_trace_find_hook)
(deprecated_trace_start_stop_hook): Deprecate.
* target.h (deprecated_target_new_objfile_hook): Deprecate.
* remote.h (deprecated_target_resume_hook)
(deprecated_target_wait_loop_hook): Deprecate.
* gdbcore.h (deprecated_exec_file_display_hook)
(deprecated_file_changed_hook): Deprecate.
* frame.h (deprecated_selected_frame_level_changed_hook): Deprecate.
* defs.h (deprecated_modify_breakpoint_hook)
(deprecated_command_loop_hook, deprecated_show_load_progress)
(deprecated_print_frame_info_listing_hook)
(deprecated_query_hook, deprecated_warning_hook)
(deprecated_flush_hook, deprecated_create_breakpoint_hook)
(deprecated_delete_breakpoint_hook)
(deprecated_interactive_hook, deprecated_registers_changed_hook)
(deprecated_readline_begin_hook, deprecated_readline_hook)
(deprecated_readline_end_hook, deprecated_register_changed_hook)
(deprecated_memory_changed_hook, deprecated_init_ui_hook)
(deprecated_context_hook, deprecated_target_wait_hook)
(deprecated_attach_hook, deprecated_detach_hook)
(deprecated_call_command_hook, deprecated_set_hook)
(deprecated_error_hook, deprecated_error_begin_hook)
(deprecated_ui_load_progress_hook): Deprecate.
* valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update.
* tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update.
* target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update.
* remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update.
* main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update.
* exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update.
* annotate.c, aix-thread.c: Update.
2004-04-22 01:52:21 +02:00
|
|
|
|
if (deprecated_modify_breakpoint_hook)
|
|
|
|
|
deprecated_modify_breakpoint_hook (bpt);
|
1999-08-31 03:14:27 +02:00
|
|
|
|
breakpoint_modify_event (bpt->number);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
disable_command (char *args, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *bpt;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (args == 0)
|
|
|
|
|
ALL_BREAKPOINTS (bpt)
|
|
|
|
|
switch (bpt->type)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
case bp_none:
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("attempted to disable apparently deleted breakpoint #%d?"),
|
1999-08-24 00:40:00 +02:00
|
|
|
|
bpt->number);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
continue;
|
|
|
|
|
case bp_breakpoint:
|
|
|
|
|
case bp_catch_load:
|
|
|
|
|
case bp_catch_unload:
|
|
|
|
|
case bp_catch_fork:
|
|
|
|
|
case bp_catch_vfork:
|
|
|
|
|
case bp_catch_exec:
|
|
|
|
|
case bp_hardware_breakpoint:
|
|
|
|
|
case bp_watchpoint:
|
|
|
|
|
case bp_hardware_watchpoint:
|
|
|
|
|
case bp_read_watchpoint:
|
|
|
|
|
case bp_access_watchpoint:
|
|
|
|
|
disable_breakpoint (bpt);
|
|
|
|
|
default:
|
|
|
|
|
continue;
|
|
|
|
|
}
|
2007-09-23 09:56:22 +02:00
|
|
|
|
else if (strchr (args, '.'))
|
|
|
|
|
{
|
|
|
|
|
struct bp_location *loc = find_location_by_number (args);
|
|
|
|
|
if (loc)
|
|
|
|
|
loc->enabled = 0;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
2007-09-23 09:56:22 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else
|
|
|
|
|
map_breakpoint_numbers (args, disable_breakpoint);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
do_enable_breakpoint (struct breakpoint *bpt, enum bpdisp disposition)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
int target_resources_ok, other_type_used;
|
|
|
|
|
struct value *mark;
|
|
|
|
|
|
|
|
|
|
if (bpt->type == bp_hardware_breakpoint)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
i = hw_breakpoint_used_count ();
|
1999-08-24 00:40:00 +02:00
|
|
|
|
target_resources_ok =
|
|
|
|
|
TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_hardware_breakpoint,
|
|
|
|
|
i + 1, 0);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (target_resources_ok == 0)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("No hardware breakpoint support in the target."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else if (target_resources_ok < 0)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Hardware breakpoints used exceeds limit."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2007-09-22 21:33:32 +02:00
|
|
|
|
if (bpt->type == bp_watchpoint ||
|
|
|
|
|
bpt->type == bp_hardware_watchpoint ||
|
|
|
|
|
bpt->type == bp_read_watchpoint ||
|
|
|
|
|
bpt->type == bp_access_watchpoint)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-09-22 21:33:32 +02:00
|
|
|
|
struct frame_id saved_frame_id;
|
|
|
|
|
|
|
|
|
|
saved_frame_id = get_frame_id (get_selected_frame (NULL));
|
|
|
|
|
if (bpt->exp_valid_block != NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-09-22 21:33:32 +02:00
|
|
|
|
struct frame_info *fr =
|
|
|
|
|
fr = frame_find_by_id (bpt->watchpoint_frame);
|
|
|
|
|
if (fr == NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2007-09-22 21:33:32 +02:00
|
|
|
|
printf_filtered (_("\
|
|
|
|
|
Cannot enable watchpoint %d because the block in which its expression\n\
|
|
|
|
|
is valid is not currently in scope.\n"), bpt->number);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return;
|
|
|
|
|
}
|
2007-09-22 21:33:32 +02:00
|
|
|
|
select_frame (fr);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2004-02-02 22:10:49 +01:00
|
|
|
|
|
2007-10-11 22:19:37 +02:00
|
|
|
|
if (bpt->val)
|
|
|
|
|
value_free (bpt->val);
|
2007-09-22 21:33:32 +02:00
|
|
|
|
mark = value_mark ();
|
2008-03-03 14:24:12 +01:00
|
|
|
|
fetch_watchpoint_value (bpt->exp, &bpt->val, NULL, NULL);
|
|
|
|
|
if (bpt->val)
|
|
|
|
|
release_value (bpt->val);
|
|
|
|
|
bpt->val_valid = 1;
|
|
|
|
|
|
2007-09-22 21:33:32 +02:00
|
|
|
|
if (bpt->type == bp_hardware_watchpoint ||
|
|
|
|
|
bpt->type == bp_read_watchpoint ||
|
1999-07-07 22:19:36 +02:00
|
|
|
|
bpt->type == bp_access_watchpoint)
|
|
|
|
|
{
|
2007-09-22 21:33:32 +02:00
|
|
|
|
int i = hw_watchpoint_used_count (bpt->type, &other_type_used);
|
|
|
|
|
int mem_cnt = can_use_hardware_watchpoint (bpt->val);
|
2004-02-02 22:10:49 +01:00
|
|
|
|
|
2007-09-22 21:33:32 +02:00
|
|
|
|
/* Hack around 'unused var' error for some targets here */
|
|
|
|
|
(void) mem_cnt, (void) i;
|
|
|
|
|
target_resources_ok = TARGET_CAN_USE_HARDWARE_WATCHPOINT (
|
|
|
|
|
bpt->type, i + mem_cnt, other_type_used);
|
|
|
|
|
/* we can consider of type is bp_hardware_watchpoint, convert to
|
|
|
|
|
bp_watchpoint in the following condition */
|
|
|
|
|
if (target_resources_ok < 0)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2007-09-22 21:33:32 +02:00
|
|
|
|
printf_filtered (_("\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Cannot enable watchpoint %d because target watch resources\n\
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 01:39:24 +01:00
|
|
|
|
have been allocated for other watchpoints.\n"), bpt->number);
|
2007-09-22 21:33:32 +02:00
|
|
|
|
value_free_to_mark (mark);
|
|
|
|
|
return;
|
1999-07-07 22:19:36 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2007-09-22 21:33:32 +02:00
|
|
|
|
|
|
|
|
|
select_frame (frame_find_by_id (saved_frame_id));
|
|
|
|
|
value_free_to_mark (mark);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
2004-02-02 22:10:49 +01:00
|
|
|
|
|
2007-10-11 22:19:37 +02:00
|
|
|
|
if (bpt->enable_state != bp_permanent)
|
|
|
|
|
bpt->enable_state = bp_enabled;
|
|
|
|
|
bpt->disposition = disposition;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
2007-10-11 22:19:37 +02:00
|
|
|
|
breakpoints_changed ();
|
|
|
|
|
|
2004-04-21 Andrew Cagney <cagney@redhat.com>
* annotate.h (deprecated_annotate_starting_hook)
(deprecated_annotate_stopped_hook)
(deprecated_annotate_exited_hook)
(deprecated_annotate_signal_hook)
(deprecated_annotate_signalled_hook): Deprecate.
* tracepoint.h (deprecated_create_tracepoint_hook)
(deprecated_delete_tracepoint_hook)
(deprecated_modify_tracepoint_hook)
(deprecated_trace_find_hook)
(deprecated_trace_start_stop_hook): Deprecate.
* target.h (deprecated_target_new_objfile_hook): Deprecate.
* remote.h (deprecated_target_resume_hook)
(deprecated_target_wait_loop_hook): Deprecate.
* gdbcore.h (deprecated_exec_file_display_hook)
(deprecated_file_changed_hook): Deprecate.
* frame.h (deprecated_selected_frame_level_changed_hook): Deprecate.
* defs.h (deprecated_modify_breakpoint_hook)
(deprecated_command_loop_hook, deprecated_show_load_progress)
(deprecated_print_frame_info_listing_hook)
(deprecated_query_hook, deprecated_warning_hook)
(deprecated_flush_hook, deprecated_create_breakpoint_hook)
(deprecated_delete_breakpoint_hook)
(deprecated_interactive_hook, deprecated_registers_changed_hook)
(deprecated_readline_begin_hook, deprecated_readline_hook)
(deprecated_readline_end_hook, deprecated_register_changed_hook)
(deprecated_memory_changed_hook, deprecated_init_ui_hook)
(deprecated_context_hook, deprecated_target_wait_hook)
(deprecated_attach_hook, deprecated_detach_hook)
(deprecated_call_command_hook, deprecated_set_hook)
(deprecated_error_hook, deprecated_error_begin_hook)
(deprecated_ui_load_progress_hook): Deprecate.
* valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update.
* tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update.
* target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update.
* remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update.
* main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update.
* exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update.
* annotate.c, aix-thread.c: Update.
2004-04-22 01:52:21 +02:00
|
|
|
|
if (deprecated_modify_breakpoint_hook)
|
|
|
|
|
deprecated_modify_breakpoint_hook (bpt);
|
1999-08-31 03:14:27 +02:00
|
|
|
|
breakpoint_modify_event (bpt->number);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2007-09-22 21:33:32 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
enable_breakpoint (struct breakpoint *bpt)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
do_enable_breakpoint (bpt, bpt->disposition);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* The enable command enables the specified breakpoints (or all defined
|
|
|
|
|
breakpoints) so they once again become (or continue to be) effective
|
2005-01-14 00:35:54 +01:00
|
|
|
|
in stopping the inferior. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
enable_command (char *args, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
struct breakpoint *bpt;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (args == 0)
|
|
|
|
|
ALL_BREAKPOINTS (bpt)
|
|
|
|
|
switch (bpt->type)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
|
|
|
|
case bp_none:
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
warning (_("attempted to enable apparently deleted breakpoint #%d?"),
|
1999-08-24 00:40:00 +02:00
|
|
|
|
bpt->number);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
continue;
|
|
|
|
|
case bp_breakpoint:
|
|
|
|
|
case bp_catch_load:
|
|
|
|
|
case bp_catch_unload:
|
|
|
|
|
case bp_catch_fork:
|
|
|
|
|
case bp_catch_vfork:
|
|
|
|
|
case bp_catch_exec:
|
|
|
|
|
case bp_hardware_breakpoint:
|
|
|
|
|
case bp_watchpoint:
|
|
|
|
|
case bp_hardware_watchpoint:
|
|
|
|
|
case bp_read_watchpoint:
|
|
|
|
|
case bp_access_watchpoint:
|
|
|
|
|
enable_breakpoint (bpt);
|
|
|
|
|
default:
|
|
|
|
|
continue;
|
|
|
|
|
}
|
2007-09-23 09:56:22 +02:00
|
|
|
|
else if (strchr (args, '.'))
|
|
|
|
|
{
|
|
|
|
|
struct bp_location *loc = find_location_by_number (args);
|
|
|
|
|
if (loc)
|
|
|
|
|
loc->enabled = 1;
|
2008-04-24 12:21:45 +02:00
|
|
|
|
update_global_location_list ();
|
2007-09-23 09:56:22 +02:00
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else
|
|
|
|
|
map_breakpoint_numbers (args, enable_breakpoint);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
enable_once_breakpoint (struct breakpoint *bpt)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2001-08-02 13:58:29 +02:00
|
|
|
|
do_enable_breakpoint (bpt, disp_disable);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
enable_once_command (char *args, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
map_breakpoint_numbers (args, enable_once_breakpoint);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
enable_delete_breakpoint (struct breakpoint *bpt)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2001-08-02 13:58:29 +02:00
|
|
|
|
do_enable_breakpoint (bpt, disp_del);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
enable_delete_command (char *args, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
map_breakpoint_numbers (args, enable_delete_breakpoint);
|
|
|
|
|
}
|
|
|
|
|
|
2004-02-27 00:46:47 +01:00
|
|
|
|
static void
|
|
|
|
|
set_breakpoint_cmd (char *args, int from_tty)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
show_breakpoint_cmd (char *args, int from_tty)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Use default_breakpoint_'s, or nothing if they aren't valid. */
|
|
|
|
|
|
|
|
|
|
struct symtabs_and_lines
|
2000-07-30 03:48:28 +02:00
|
|
|
|
decode_line_spec_1 (char *string, int funfirstline)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
struct symtabs_and_lines sals;
|
|
|
|
|
if (string == 0)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Empty line specification."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (default_breakpoint_valid)
|
|
|
|
|
sals = decode_line_1 (&string, funfirstline,
|
1999-08-24 00:40:00 +02:00
|
|
|
|
default_breakpoint_symtab,
|
|
|
|
|
default_breakpoint_line,
|
2003-12-17 22:47:47 +01:00
|
|
|
|
(char ***) NULL, NULL);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
else
|
|
|
|
|
sals = decode_line_1 (&string, funfirstline,
|
2003-12-17 22:47:47 +01:00
|
|
|
|
(struct symtab *) NULL, 0, (char ***) NULL, NULL);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (*string)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
|
error (_("Junk at end of line specification: %s"), string);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
return sals;
|
|
|
|
|
}
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
|
|
|
|
|
/* Create and insert a raw software breakpoint at PC. Return an
|
|
|
|
|
identifier, which should be used to remove the breakpoint later.
|
|
|
|
|
In general, places which call this should be using something on the
|
|
|
|
|
breakpoint chain instead; this function should be eliminated
|
|
|
|
|
someday. */
|
|
|
|
|
|
|
|
|
|
void *
|
|
|
|
|
deprecated_insert_raw_breakpoint (CORE_ADDR pc)
|
|
|
|
|
{
|
|
|
|
|
struct bp_target_info *bp_tgt;
|
|
|
|
|
|
|
|
|
|
bp_tgt = xmalloc (sizeof (struct bp_target_info));
|
|
|
|
|
memset (bp_tgt, 0, sizeof (struct bp_target_info));
|
|
|
|
|
|
|
|
|
|
bp_tgt->placed_address = pc;
|
|
|
|
|
if (target_insert_breakpoint (bp_tgt) != 0)
|
|
|
|
|
{
|
|
|
|
|
/* Could not insert the breakpoint. */
|
|
|
|
|
xfree (bp_tgt);
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return bp_tgt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Remove a breakpoint BP inserted by deprecated_insert_raw_breakpoint. */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
deprecated_remove_raw_breakpoint (void *bp)
|
|
|
|
|
{
|
|
|
|
|
struct bp_target_info *bp_tgt = bp;
|
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
|
|
ret = target_remove_breakpoint (bp_tgt);
|
|
|
|
|
xfree (bp_tgt);
|
|
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* One (or perhaps two) breakpoints used for software single stepping. */
|
|
|
|
|
|
|
|
|
|
static void *single_step_breakpoints[2];
|
|
|
|
|
|
|
|
|
|
/* Create and insert a breakpoint for software single step. */
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
insert_single_step_breakpoint (CORE_ADDR next_pc)
|
|
|
|
|
{
|
|
|
|
|
void **bpt_p;
|
|
|
|
|
|
|
|
|
|
if (single_step_breakpoints[0] == NULL)
|
|
|
|
|
bpt_p = &single_step_breakpoints[0];
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
gdb_assert (single_step_breakpoints[1] == NULL);
|
|
|
|
|
bpt_p = &single_step_breakpoints[1];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* NOTE drow/2006-04-11: A future improvement to this function would be
|
|
|
|
|
to only create the breakpoints once, and actually put them on the
|
|
|
|
|
breakpoint chain. That would let us use set_raw_breakpoint. We could
|
|
|
|
|
adjust the addresses each time they were needed. Doing this requires
|
|
|
|
|
corresponding changes elsewhere where single step breakpoints are
|
|
|
|
|
handled, however. So, for now, we use this. */
|
|
|
|
|
|
|
|
|
|
*bpt_p = deprecated_insert_raw_breakpoint (next_pc);
|
|
|
|
|
if (*bpt_p == NULL)
|
2006-05-01 18:38:08 +02:00
|
|
|
|
error (_("Could not insert single-step breakpoint at 0x%s"),
|
gdb/
* breakpoint.c (deprecated_read_memory_nobpt): Update to use
shadow_len.
(insert_bp_location, reattach_breakpoints, remove_breakpoint)
(delete_breakpoint): Update calls to changed methods.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(single_step_breakpoints, insert_single_step_breakpoint)
(remove_single_step_breakpoints): New.
* breakpoint.h (struct bp_target_info): New.
(struct bp_location): Replace shadow_contents with
target_info and overlay_target_info.
(deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint)
(insert_single_step_breakpoint, remove_single_step_breakpoints): New
prototypes.
* gdbarch.sh: Forward declare struct bp_target_info in gdbarch.h.
(memory_insert_breakpoint, memory_remove_breakpoint): Update second
argument.
* mem-break.c (default_memory_insert_breakpoint): Update. Set
placed_address, placed_size, and shadow_len.
(default_memory_remove_breakpoint): Update. Don't use
BREAKPOINT_FROM_PC.
(memory_insert_breakpoint, memory_remove_breakpoint): Update.
* target.c (update_current_target): Update prototypes for changed
functions.
(debug_to_insert_breakpoint, debug_to_remove_breakpoint)
(debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint):
Update.
* target.h: Forward declare struct bp_target_info.
(struct target_ops): Use a bp_target_info argument for
to_insert_breakpoint, to_remove_breakpoint,
to_insert_hw_breakpoint, and to_remove_hw_breakpoint.
(target_insert_breakpoint, target_remove_breakpoint)
(target_insert_hw_breakpoint, target_remove_hw_breakpoint)
(memory_insert_breakpoint, memory_remove_breakpoint)
(default_memory_insert_breakpoint, default_memory_remove_breakpoint):
Update.
* config/i386/nm-i386.h: Forward declare struct bp_target_info.
(i386_insert_hw_breakpoint, i386_remove_hw_breakpoint): Update.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Use
insert_single_step_breakpoint and remove_single_step_breakpoints.
Remove unused statics.
* arm-tdep.c (arm_software_single_step): Likewise. Add a note.
* cris-tdep.c (cris_software_single_step): Likewise.
* mips-tdep.c (mips_software_single_step): Likewise.
* rs6000-tdep.c (rs6000_software_single_step): Likewise.
* sparc-tdep.c (sparc_software_single_step): Likewise.
* wince.c (struct thread_info_struct): Remove step_prev.
(undoSStep): Use remove_single_step_breakpoints.
(wince_software_single_step): Use insert_single_step_breakpoint.
* corelow.c (ignore): Remove unneeded prototype. Update arguments.
* exec.c (ignore): Likewise.
* sol-thread.c (ignore): Likewise.
* procfs.c (dbx_link_shadow_contents): Delete.
(dbx_link_bpt): New.
(procfs_mourn_inferior): Remove it if necessary.
(remove_dbx_link_breakpoint): Use it.
(insert_dbx_link_bpt_in_file): Set it.
(procfs_init_inferior): Don't update dbx_link_bpt_addr.
* rs6000-nat.c (exec_one_dummy_insn): Use
deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* solib-irix.c (shadow_contents, breakpoint_addr): Delete.
(base_breakpoint): New.
(disable_break): Use it.
(enable_break): Set it.
* i386-nat.c (i386_insert_hw_breakpoint, i386_remove_hw_breakpoint):
Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint)
(ia64_memory_remove_breakpoint): Likewise.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Likewise. Remove unnecessary prototypes. Use placed_address
and placed_size. Removed useless read from memory.
* nto-procfs.c (procfs_insert_breakpoint)
(procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
(procfs_remove_hw_breakpoint): Update.
* ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ocd.h (ocd_insert_breakpoint, ocd_remove_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Likewise.
* remote-e7000.c (e7000_insert_breakpoint)
(e7000_remove_breakpoint): Likewise.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Likewise.
* remote-mips.c (mips_insert_breakpoint)
(mips_remove_breakpoint): Likewise.
* remote-rdp.c (remote_rdp_insert_breakpoint)
(remote_rdp_remove_breakpoint): Likewise.
(rdp_step): Use deprecated_insert_raw_breakpoint and
deprecated_remove_raw_breakpoint.
* remote-sds.c (sds_insert_breakpoint, sds_remove_breakpoint):
Update.
* remote-sim.c (gdbsim_insert_breakpoint, gdbsim_remove_breakpoint):
Delete.
(init_gdbsim_ops): Use memory_insert_breakpoint and
memory_remove_breakpoint.
* remote-st.c (st2000_insert_breakpoint)
(st2000_remove_breakpoint): Update. Remove unused
BREAKPOINT_FROM_PC.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Update. Use placed_address and placed_size.
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
gdb/doc/
* gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert
and remove breakpoint prototypes.
(Watchpoints): Move description of target_insert_hw_breakpoint and
target_remove_hw_breakpoint ...
(Breakpoints): ... to here. Document target_insert_breakpoint and
target_remove_breakpoint.
2006-04-18 21:20:08 +02:00
|
|
|
|
paddr_nz (next_pc));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Remove and delete any breakpoints used for software single step. */
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
remove_single_step_breakpoints (void)
|
|
|
|
|
{
|
|
|
|
|
gdb_assert (single_step_breakpoints[0] != NULL);
|
|
|
|
|
|
|
|
|
|
/* See insert_single_step_breakpoint for more about this deprecated
|
|
|
|
|
call. */
|
|
|
|
|
deprecated_remove_raw_breakpoint (single_step_breakpoints[0]);
|
|
|
|
|
single_step_breakpoints[0] = NULL;
|
|
|
|
|
|
|
|
|
|
if (single_step_breakpoints[1] != NULL)
|
|
|
|
|
{
|
|
|
|
|
deprecated_remove_raw_breakpoint (single_step_breakpoints[1]);
|
|
|
|
|
single_step_breakpoints[1] = NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2007-05-11 14:44:34 +02:00
|
|
|
|
/* Check whether a software single-step breakpoint is inserted at PC. */
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
single_step_breakpoint_inserted_here_p (CORE_ADDR pc)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 2; i++)
|
|
|
|
|
{
|
|
|
|
|
struct bp_target_info *bp_tgt = single_step_breakpoints[i];
|
|
|
|
|
if (bp_tgt && bp_tgt->placed_address == pc)
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2008-04-24 12:21:45 +02:00
|
|
|
|
int breakpoints_always_inserted_mode (void)
|
|
|
|
|
{
|
|
|
|
|
return always_inserted_mode;
|
|
|
|
|
}
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-12-02 15:58:18 +01:00
|
|
|
|
/* This help string is used for the break, hbreak, tbreak and thbreak commands.
|
|
|
|
|
It is defined as a macro to prevent duplication.
|
|
|
|
|
COMMAND should be a string constant containing the name of the command. */
|
|
|
|
|
#define BREAK_ARGS_HELP(command) \
|
|
|
|
|
command" [LOCATION] [thread THREADNUM] [if CONDITION]\n\
|
|
|
|
|
LOCATION may be a line number, function name, or \"*\" and an address.\n\
|
|
|
|
|
If a line number is specified, break at start of code for that line.\n\
|
|
|
|
|
If a function is specified, break at start of code for that function.\n\
|
|
|
|
|
If an address is specified, break at that exact address.\n\
|
|
|
|
|
With no LOCATION, uses current execution address of selected stack frame.\n\
|
|
|
|
|
This is useful for breaking on return to a stack frame.\n\
|
|
|
|
|
\n\
|
|
|
|
|
THREADNUM is the number from \"info threads\".\n\
|
|
|
|
|
CONDITION is a boolean expression.\n\
|
|
|
|
|
\n\
|
|
|
|
|
Multiple breakpoints at one place are permitted, and useful if conditional.\n\
|
|
|
|
|
\n\
|
|
|
|
|
Do \"help breakpoints\" for info on other commands dealing with breakpoints."
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
_initialize_breakpoint (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2004-02-27 00:46:47 +01:00
|
|
|
|
static struct cmd_list_element *breakpoint_set_cmdlist;
|
|
|
|
|
static struct cmd_list_element *breakpoint_show_cmdlist;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
struct cmd_list_element *c;
|
|
|
|
|
|
2004-09-01 20:00:29 +02:00
|
|
|
|
observer_attach_solib_unloaded (disable_breakpoints_in_unloaded_shlib);
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
breakpoint_chain = 0;
|
|
|
|
|
/* Don't bother to call set_breakpoint_count. $bpnum isn't useful
|
|
|
|
|
before a breakpoint is set. */
|
|
|
|
|
breakpoint_count = 0;
|
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_com ("ignore", class_breakpoint, ignore_command, _("\
|
|
|
|
|
Set ignore-count of breakpoint number N to COUNT.\n\
|
|
|
|
|
Usage is `ignore N COUNT'."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (xdb_commands)
|
1999-07-07 22:19:36 +02:00
|
|
|
|
add_com_alias ("bc", "ignore", class_breakpoint, 1);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_com ("commands", class_breakpoint, commands_command, _("\
|
|
|
|
|
Set commands to be executed when a breakpoint is hit.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Give breakpoint number as argument after \"commands\".\n\
|
|
|
|
|
With no argument, the targeted breakpoint is the last one set.\n\
|
|
|
|
|
The commands themselves follow starting on the next line.\n\
|
|
|
|
|
Type a line containing \"end\" to indicate the end of them.\n\
|
|
|
|
|
Give \"silent\" as the first line to make the breakpoint silent;\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
then no output is printed when it is hit, except what the commands print."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_com ("condition", class_breakpoint, condition_command, _("\
|
|
|
|
|
Specify breakpoint number N to break only if COND is true.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Usage is `condition N COND', where N is an integer and COND is an\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
expression to be evaluated whenever breakpoint N is reached."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
c = add_com ("tbreak", class_breakpoint, tbreak_command, _("\
|
2005-12-02 15:58:18 +01:00
|
|
|
|
Set a temporary breakpoint.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Like \"break\" except the breakpoint is only temporary,\n\
|
|
|
|
|
so it will be deleted when hit. Equivalent to \"break\" followed\n\
|
2005-12-02 15:58:18 +01:00
|
|
|
|
by using \"enable delete\" on the breakpoint number.\n\
|
|
|
|
|
\n"
|
|
|
|
|
BREAK_ARGS_HELP ("tbreak")));
|
2002-03-06 07:28:35 +01:00
|
|
|
|
set_cmd_completer (c, location_completer);
|
* completer.c (gdb_completer_loc_break_characters): New variable.
(line_completion_function): If we are completing on locations,
back up the start of word pointer past all characters which can
appear in a location spec.
(location_completer): New function.
* completer.h: Add prototype for location_completer.
* symtab.c (make_source_files_completion_list)
(add_filename_to_list, not_interesting_fname): New functions.
(filename_seen): New function, body extracted from
output_source_filename.
(output_source_filename): Call filename_seen to check if the file
was already printed.
(make_symbol_completion_list): If TEXT includes a
double-quoted string, return an empty list, not NULL.
(make_file_symbol_completion_list): New function, similar to
make_symbol_completion_list but with an additional argument
SRCFILE.
* symtab.h (make_file_symbol_completion_list)
(make_source_files_completion_list): Add prototypes.
* breakpoint.c (_initialize_breakpoint): Make location_completer
be the completion function for all commands which set breakpoints
and watchpoints.
(top-level): #include "completer.h".
* tracepoint.c (_initialize_tracepoint): Make location_completer
be the completion function for the "trace" command.
(top-level): #include "completer.h".
* printcmd.c (_initialize_printcmd): Make location_completer be
the completion function for the "print", "inspect", "call", and
"disassemble" commands.
(top-level): #include "completer.h".
* infcmd.c (_initialize_infcmd): Make location_completer be the
completion function for the "go", "jump", and "until" commands.
(top-level): #include "completer.h".
2001-06-11 18:05:25 +02:00
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
c = add_com ("hbreak", class_breakpoint, hbreak_command, _("\
|
2005-12-02 15:58:18 +01:00
|
|
|
|
Set a hardware assisted breakpoint.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Like \"break\" except the breakpoint requires hardware support,\n\
|
2005-12-02 15:58:18 +01:00
|
|
|
|
some target hardware may not have this support.\n\
|
|
|
|
|
\n"
|
|
|
|
|
BREAK_ARGS_HELP ("hbreak")));
|
2002-03-06 07:28:35 +01:00
|
|
|
|
set_cmd_completer (c, location_completer);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
c = add_com ("thbreak", class_breakpoint, thbreak_command, _("\
|
2005-12-02 15:58:18 +01:00
|
|
|
|
Set a temporary hardware assisted breakpoint.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Like \"hbreak\" except the breakpoint is only temporary,\n\
|
2005-12-02 15:58:18 +01:00
|
|
|
|
so it will be deleted when hit.\n\
|
|
|
|
|
\n"
|
|
|
|
|
BREAK_ARGS_HELP ("thbreak")));
|
2002-03-06 07:28:35 +01:00
|
|
|
|
set_cmd_completer (c, location_completer);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_prefix_cmd ("enable", class_breakpoint, enable_command, _("\
|
|
|
|
|
Enable some breakpoints.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Give breakpoint numbers (separated by spaces) as arguments.\n\
|
|
|
|
|
With no subcommand, breakpoints are enabled until you command otherwise.\n\
|
|
|
|
|
This is used to cancel the effect of the \"disable\" command.\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
With a subcommand you can enable temporarily."),
|
1999-04-16 03:35:26 +02:00
|
|
|
|
&enablelist, "enable ", 1, &cmdlist);
|
|
|
|
|
if (xdb_commands)
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_com ("ab", class_breakpoint, enable_command, _("\
|
|
|
|
|
Enable some breakpoints.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Give breakpoint numbers (separated by spaces) as arguments.\n\
|
|
|
|
|
With no subcommand, breakpoints are enabled until you command otherwise.\n\
|
|
|
|
|
This is used to cancel the effect of the \"disable\" command.\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
With a subcommand you can enable temporarily."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
add_com_alias ("en", "enable", class_breakpoint, 1);
|
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_abbrev_prefix_cmd ("breakpoints", class_breakpoint, enable_command, _("\
|
|
|
|
|
Enable some breakpoints.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Give breakpoint numbers (separated by spaces) as arguments.\n\
|
|
|
|
|
This is used to cancel the effect of the \"disable\" command.\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
May be abbreviated to simply \"enable\".\n"),
|
1999-07-07 22:19:36 +02:00
|
|
|
|
&enablebreaklist, "enable breakpoints ", 1, &enablelist);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
add_cmd ("once", no_class, enable_once_command, _("\
|
|
|
|
|
Enable breakpoints for one hit. Give breakpoint numbers.\n\
|
|
|
|
|
If a breakpoint is hit while enabled in this fashion, it becomes disabled."),
|
1999-04-16 03:35:26 +02:00
|
|
|
|
&enablebreaklist);
|
|
|
|
|
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
add_cmd ("delete", no_class, enable_delete_command, _("\
|
|
|
|
|
Enable breakpoints and delete when hit. Give breakpoint numbers.\n\
|
|
|
|
|
If a breakpoint is hit while enabled in this fashion, it is deleted."),
|
1999-04-16 03:35:26 +02:00
|
|
|
|
&enablebreaklist);
|
|
|
|
|
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
add_cmd ("delete", no_class, enable_delete_command, _("\
|
|
|
|
|
Enable breakpoints and delete when hit. Give breakpoint numbers.\n\
|
|
|
|
|
If a breakpoint is hit while enabled in this fashion, it is deleted."),
|
1999-04-16 03:35:26 +02:00
|
|
|
|
&enablelist);
|
|
|
|
|
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
add_cmd ("once", no_class, enable_once_command, _("\
|
|
|
|
|
Enable breakpoints for one hit. Give breakpoint numbers.\n\
|
|
|
|
|
If a breakpoint is hit while enabled in this fashion, it becomes disabled."),
|
1999-04-16 03:35:26 +02:00
|
|
|
|
&enablelist);
|
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_prefix_cmd ("disable", class_breakpoint, disable_command, _("\
|
|
|
|
|
Disable some breakpoints.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Arguments are breakpoint numbers with spaces in between.\n\
|
|
|
|
|
To disable all breakpoints, give no argument.\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
A disabled breakpoint is not forgotten, but has no effect until reenabled."),
|
1999-04-16 03:35:26 +02:00
|
|
|
|
&disablelist, "disable ", 1, &cmdlist);
|
|
|
|
|
add_com_alias ("dis", "disable", class_breakpoint, 1);
|
|
|
|
|
add_com_alias ("disa", "disable", class_breakpoint, 1);
|
|
|
|
|
if (xdb_commands)
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_com ("sb", class_breakpoint, disable_command, _("\
|
|
|
|
|
Disable some breakpoints.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Arguments are breakpoint numbers with spaces in between.\n\
|
|
|
|
|
To disable all breakpoints, give no argument.\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
A disabled breakpoint is not forgotten, but has no effect until reenabled."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
add_cmd ("breakpoints", class_alias, disable_command, _("\
|
|
|
|
|
Disable some breakpoints.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Arguments are breakpoint numbers with spaces in between.\n\
|
|
|
|
|
To disable all breakpoints, give no argument.\n\
|
|
|
|
|
A disabled breakpoint is not forgotten, but has no effect until reenabled.\n\
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
This command may be abbreviated \"disable\"."),
|
1999-04-16 03:35:26 +02:00
|
|
|
|
&disablelist);
|
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_prefix_cmd ("delete", class_breakpoint, delete_command, _("\
|
|
|
|
|
Delete some breakpoints or auto-display expressions.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Arguments are breakpoint numbers with spaces in between.\n\
|
|
|
|
|
To delete all breakpoints, give no argument.\n\
|
|
|
|
|
\n\
|
|
|
|
|
Also a prefix command for deletion of other GDB objects.\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
The \"unset\" command is also an alias for \"delete\"."),
|
1999-04-16 03:35:26 +02:00
|
|
|
|
&deletelist, "delete ", 1, &cmdlist);
|
|
|
|
|
add_com_alias ("d", "delete", class_breakpoint, 1);
|
2006-04-06 20:33:05 +02:00
|
|
|
|
add_com_alias ("del", "delete", class_breakpoint, 1);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
if (xdb_commands)
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_com ("db", class_breakpoint, delete_command, _("\
|
|
|
|
|
Delete some breakpoints.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Arguments are breakpoint numbers with spaces in between.\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
To delete all breakpoints, give no argument.\n"));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
add_cmd ("breakpoints", class_alias, delete_command, _("\
|
|
|
|
|
Delete some breakpoints or auto-display expressions.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Arguments are breakpoint numbers with spaces in between.\n\
|
|
|
|
|
To delete all breakpoints, give no argument.\n\
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
This command may be abbreviated \"delete\"."),
|
1999-04-16 03:35:26 +02:00
|
|
|
|
&deletelist);
|
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_com ("clear", class_breakpoint, clear_command, _("\
|
|
|
|
|
Clear breakpoint at specified line or function.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Argument may be line number, function name, or \"*\" and an address.\n\
|
|
|
|
|
If line number is specified, all breakpoints in that line are cleared.\n\
|
|
|
|
|
If function is specified, breakpoints at beginning of function are cleared.\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
If an address is specified, breakpoints at that address are cleared.\n\
|
|
|
|
|
\n\
|
|
|
|
|
With no argument, clears all breakpoints in the line that the selected frame\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
is executing in.\n\
|
|
|
|
|
\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
See also the \"delete\" command which clears breakpoints by number."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
c = add_com ("break", class_breakpoint, break_command, _("\
|
2005-12-02 15:58:18 +01:00
|
|
|
|
Set breakpoint at specified line or function.\n"
|
|
|
|
|
BREAK_ARGS_HELP ("break")));
|
2002-03-06 07:28:35 +01:00
|
|
|
|
set_cmd_completer (c, location_completer);
|
* completer.c (gdb_completer_loc_break_characters): New variable.
(line_completion_function): If we are completing on locations,
back up the start of word pointer past all characters which can
appear in a location spec.
(location_completer): New function.
* completer.h: Add prototype for location_completer.
* symtab.c (make_source_files_completion_list)
(add_filename_to_list, not_interesting_fname): New functions.
(filename_seen): New function, body extracted from
output_source_filename.
(output_source_filename): Call filename_seen to check if the file
was already printed.
(make_symbol_completion_list): If TEXT includes a
double-quoted string, return an empty list, not NULL.
(make_file_symbol_completion_list): New function, similar to
make_symbol_completion_list but with an additional argument
SRCFILE.
* symtab.h (make_file_symbol_completion_list)
(make_source_files_completion_list): Add prototypes.
* breakpoint.c (_initialize_breakpoint): Make location_completer
be the completion function for all commands which set breakpoints
and watchpoints.
(top-level): #include "completer.h".
* tracepoint.c (_initialize_tracepoint): Make location_completer
be the completion function for the "trace" command.
(top-level): #include "completer.h".
* printcmd.c (_initialize_printcmd): Make location_completer be
the completion function for the "print", "inspect", "call", and
"disassemble" commands.
(top-level): #include "completer.h".
* infcmd.c (_initialize_infcmd): Make location_completer be the
completion function for the "go", "jump", and "until" commands.
(top-level): #include "completer.h".
2001-06-11 18:05:25 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
add_com_alias ("b", "break", class_run, 1);
|
|
|
|
|
add_com_alias ("br", "break", class_run, 1);
|
|
|
|
|
add_com_alias ("bre", "break", class_run, 1);
|
|
|
|
|
add_com_alias ("brea", "break", class_run, 1);
|
|
|
|
|
|
2002-02-01 03:05:13 +01:00
|
|
|
|
if (xdb_commands)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
add_com_alias ("ba", "break", class_breakpoint, 1);
|
|
|
|
|
add_com_alias ("bu", "ubreak", class_breakpoint, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (dbx_commands)
|
|
|
|
|
{
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_abbrev_prefix_cmd ("stop", class_breakpoint, stop_command, _("\
|
|
|
|
|
Break in function/address or break at a line in the current file."),
|
1999-07-07 22:19:36 +02:00
|
|
|
|
&stoplist, "stop ", 1, &cmdlist);
|
|
|
|
|
add_cmd ("in", class_breakpoint, stopin_command,
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
_("Break in function or address."), &stoplist);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
add_cmd ("at", class_breakpoint, stopat_command,
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
_("Break at a line in the current file."), &stoplist);
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_com ("status", class_info, breakpoints_info, _("\
|
|
|
|
|
Status of user-settable breakpoints, or breakpoint number NUMBER.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
The \"Type\" column indicates one of:\n\
|
|
|
|
|
\tbreakpoint - normal breakpoint\n\
|
|
|
|
|
\twatchpoint - watchpoint\n\
|
|
|
|
|
The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
|
|
|
|
|
the disposition of the breakpoint after it gets hit. \"dis\" means that the\n\
|
|
|
|
|
breakpoint will be disabled. The \"Address\" and \"What\" columns indicate the\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
address and file/line number respectively.\n\
|
|
|
|
|
\n\
|
|
|
|
|
Convenience variable \"$_\" and default examine address for \"x\"\n\
|
2007-07-11 00:59:42 +02:00
|
|
|
|
are set to the address of the last breakpoint listed unless the command\n\
|
|
|
|
|
is prefixed with \"server \".\n\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Convenience variable \"$bpnum\" contains the number of the last\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
breakpoint set."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_info ("breakpoints", breakpoints_info, _("\
|
|
|
|
|
Status of user-settable breakpoints, or breakpoint number NUMBER.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
The \"Type\" column indicates one of:\n\
|
|
|
|
|
\tbreakpoint - normal breakpoint\n\
|
|
|
|
|
\twatchpoint - watchpoint\n\
|
|
|
|
|
The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
|
|
|
|
|
the disposition of the breakpoint after it gets hit. \"dis\" means that the\n\
|
|
|
|
|
breakpoint will be disabled. The \"Address\" and \"What\" columns indicate the\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
address and file/line number respectively.\n\
|
|
|
|
|
\n\
|
|
|
|
|
Convenience variable \"$_\" and default examine address for \"x\"\n\
|
2007-07-11 00:59:42 +02:00
|
|
|
|
are set to the address of the last breakpoint listed unless the command\n\
|
|
|
|
|
is prefixed with \"server \".\n\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Convenience variable \"$bpnum\" contains the number of the last\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
breakpoint set."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
if (xdb_commands)
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_com ("lb", class_breakpoint, breakpoints_info, _("\
|
|
|
|
|
Status of user-settable breakpoints, or breakpoint number NUMBER.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
The \"Type\" column indicates one of:\n\
|
|
|
|
|
\tbreakpoint - normal breakpoint\n\
|
|
|
|
|
\twatchpoint - watchpoint\n\
|
|
|
|
|
The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
|
|
|
|
|
the disposition of the breakpoint after it gets hit. \"dis\" means that the\n\
|
|
|
|
|
breakpoint will be disabled. The \"Address\" and \"What\" columns indicate the\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
address and file/line number respectively.\n\
|
|
|
|
|
\n\
|
|
|
|
|
Convenience variable \"$_\" and default examine address for \"x\"\n\
|
2007-07-11 00:59:42 +02:00
|
|
|
|
are set to the address of the last breakpoint listed unless the command\n\
|
|
|
|
|
is prefixed with \"server \".\n\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Convenience variable \"$bpnum\" contains the number of the last\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
breakpoint set."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
add_cmd ("breakpoints", class_maintenance, maintenance_info_breakpoints, _("\
|
|
|
|
|
Status of all breakpoints, or breakpoint number NUMBER.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
The \"Type\" column indicates one of:\n\
|
|
|
|
|
\tbreakpoint - normal breakpoint\n\
|
|
|
|
|
\twatchpoint - watchpoint\n\
|
|
|
|
|
\tlongjmp - internal breakpoint used to step through longjmp()\n\
|
|
|
|
|
\tlongjmp resume - internal breakpoint at the target of longjmp()\n\
|
|
|
|
|
\tuntil - internal breakpoint used by the \"until\" command\n\
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
\tfinish - internal breakpoint used by the \"finish\" command\n\
|
|
|
|
|
The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
the disposition of the breakpoint after it gets hit. \"dis\" means that the\n\
|
|
|
|
|
breakpoint will be disabled. The \"Address\" and \"What\" columns indicate the\n\
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
address and file/line number respectively.\n\
|
|
|
|
|
\n\
|
|
|
|
|
Convenience variable \"$_\" and default examine address for \"x\"\n\
|
2007-07-11 00:59:42 +02:00
|
|
|
|
are set to the address of the last breakpoint listed unless the command\n\
|
|
|
|
|
is prefixed with \"server \".\n\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Convenience variable \"$bpnum\" contains the number of the last\n\
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 19:10:11 +01:00
|
|
|
|
breakpoint set."),
|
1999-04-16 03:35:26 +02:00
|
|
|
|
&maintenanceinfolist);
|
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_com ("catch", class_breakpoint, catch_command, _("\
|
|
|
|
|
Set catchpoints to catch events.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Raised signals may be caught:\n\
|
|
|
|
|
\tcatch signal - all signals\n\
|
|
|
|
|
\tcatch signal <signame> - a particular signal\n\
|
|
|
|
|
Raised exceptions may be caught:\n\
|
|
|
|
|
\tcatch throw - all exceptions, when thrown\n\
|
|
|
|
|
\tcatch throw <exceptname> - a particular exception, when thrown\n\
|
|
|
|
|
\tcatch catch - all exceptions, when caught\n\
|
|
|
|
|
\tcatch catch <exceptname> - a particular exception, when caught\n\
|
|
|
|
|
Thread or process events may be caught:\n\
|
|
|
|
|
\tcatch thread_start - any threads, just after creation\n\
|
|
|
|
|
\tcatch thread_exit - any threads, just before expiration\n\
|
|
|
|
|
\tcatch thread_join - any threads, just after joins\n\
|
|
|
|
|
Process events may be caught:\n\
|
|
|
|
|
\tcatch start - any processes, just after creation\n\
|
|
|
|
|
\tcatch exit - any processes, just before expiration\n\
|
|
|
|
|
\tcatch fork - calls to fork()\n\
|
|
|
|
|
\tcatch vfork - calls to vfork()\n\
|
|
|
|
|
\tcatch exec - calls to exec()\n\
|
|
|
|
|
Dynamically-linked library events may be caught:\n\
|
|
|
|
|
\tcatch load - loads of any library\n\
|
|
|
|
|
\tcatch load <libname> - loads of a particular library\n\
|
|
|
|
|
\tcatch unload - unloads of any library\n\
|
|
|
|
|
\tcatch unload <libname> - unloads of a particular library\n\
|
|
|
|
|
The act of your program's execution stopping may also be caught:\n\
|
|
|
|
|
\tcatch stop\n\n\
|
|
|
|
|
C++ exceptions may be caught:\n\
|
|
|
|
|
\tcatch throw - all exceptions, when thrown\n\
|
|
|
|
|
\tcatch catch - all exceptions, when caught\n\
|
* ada-lang.h (ada_find_printable_frame): Remove.
(ada_exception_catchpoint_p, ada_decode_exception_location)
(ada_decode_assert_location): Add declaration.
* ada-lang.c: Add include of annotate.h and valprint.h.
(exception_catchpoint_kind): New enum.
(function_name_from_pc, is_known_support_routine)
(ada_find_printable_frame, ada_unhandled_exception_name_addr)
(ada_exception_name_addr_1, ada_exception_name_addr)
(print_it_exception, print_one_exception, print_mention_exception)
(print_it_catch_exception, print_one_catch_exception)
(print_mention_catch_exception, catch_exception_breakpoint_ops)
(print_it_catch_exception_unhandled)
(print_one_catch_exception_unhandled)
(print_mention_catch_exception_unhandled, print_it_catch_assert)
(print_one_catch_assert, print_mention_catch_assert)
(ada_exception_catchpoint_p, error_breakpoint_runtime_sym_not_found)
(ada_get_next_arg, catch_ada_exception_command_split)
(ada_exception_sym_name, ada_exception_sym_name)
(ada_exception_breakption_ops, ada_exception_catchpoint_cond_string)
(ada_parse_catchpoint_condition, ada_exception_sal)
(ada_decode_exception_location)
(ada_decode_assert_location): New function.
(catch_exception_unhandled_breakpoint_ops): New global variable.
(catch_assert_breakpoint_ops): New global variable.
* breakpoint.c: Add include of ada-lang.h.
(print_one_breakpoint): Do not print the condition for Ada
exception catchpoints.
(create_ada_exception_breakpoint): New function.
(catch_ada_exception_command, catch_assert_command): New function.
(catch_command_1): Add support for the new "catch exception" and
"catch assert" commands.
(_initialize_breakpoint): Add help description for the new catch
commands.
* Makefile.in (ada-lang.o): Add dependency on annotate.h and
valprint.h.
(breakpoint.o): Add dependency on ada-lang.h.
2007-01-04 06:27:31 +01:00
|
|
|
|
Ada exceptions may be caught:\n\
|
|
|
|
|
\tcatch exception - all exceptions, when raised\n\
|
|
|
|
|
\tcatch exception <name> - a particular exception, when raised\n\
|
|
|
|
|
\tcatch exception unhandled - all unhandled exceptions, when raised\n\
|
|
|
|
|
\tcatch assert - all failed assertions, when raised\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
\n\
|
|
|
|
|
Do \"help set follow-fork-mode\" for info on debugging your program\n\
|
|
|
|
|
after a fork or vfork is caught.\n\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
Do \"help breakpoints\" for info on other commands dealing with breakpoints."));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_com ("tcatch", class_breakpoint, tcatch_command, _("\
|
|
|
|
|
Set temporary catchpoints to catch events.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Args like \"catch\" command.\n\
|
|
|
|
|
Like \"catch\" except the catchpoint is only temporary,\n\
|
|
|
|
|
so it will be deleted when hit. Equivalent to \"catch\" followed\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
by using \"enable delete\" on the catchpoint number."));
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
c = add_com ("watch", class_breakpoint, watch_command, _("\
|
|
|
|
|
Set a watchpoint for an expression.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
A watchpoint stops execution of your program whenever the value of\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
an expression changes."));
|
2002-03-06 07:28:35 +01:00
|
|
|
|
set_cmd_completer (c, location_completer);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
c = add_com ("rwatch", class_breakpoint, rwatch_command, _("\
|
|
|
|
|
Set a read watchpoint for an expression.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
A watchpoint stops execution of your program whenever the value of\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
an expression is read."));
|
2002-03-06 07:28:35 +01:00
|
|
|
|
set_cmd_completer (c, location_completer);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
c = add_com ("awatch", class_breakpoint, awatch_command, _("\
|
|
|
|
|
Set a watchpoint for an expression.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
A watchpoint stops execution of your program whenever the value of\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
an expression is either read or written."));
|
2002-03-06 07:28:35 +01:00
|
|
|
|
set_cmd_completer (c, location_completer);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
add_info ("watchpoints", breakpoints_info,
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
_("Synonym for ``info breakpoints''."));
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 14:51:36 +01:00
|
|
|
|
/* XXX: cagney/2005-02-23: This should be a boolean, and should
|
|
|
|
|
respond to changes - contrary to the description. */
|
2005-02-18 Andrew Cagney <cagney@gnu.org>
Use add_setshow_zinteger_cmd through out. Re-sync gdbarch.sh
and gdbarch.c.
* breakpoint.c, frame.c, gdb-events.sh, gdbarch.sh: Update.
* gdbtypes.c, infrun.c, linux-nat.c, maint.c, monitor.c: Update.
* pa64solib.c, parse.c, remote-mips.c, ser-go32.c: Update.
* serial.c, solib-frv.c, somsolib.c, target.c, top.c: Update.
* varobj.c, cli/cli-cmds.c: Update.
* gdbarch.c, gdb-events.c: Regenerate.
2005-02-18 19:58:56 +01:00
|
|
|
|
add_setshow_zinteger_cmd ("can-use-hw-watchpoints", class_support,
|
|
|
|
|
&can_use_hw_watchpoints, _("\
|
|
|
|
|
Set debugger's willingness to use watchpoint hardware."), _("\
|
|
|
|
|
Show debugger's willingness to use watchpoint hardware."), _("\
|
1999-04-16 03:35:26 +02:00
|
|
|
|
If zero, gdb will not use hardware for new watchpoints, even if\n\
|
|
|
|
|
such is available. (However, any hardware watchpoints that were\n\
|
|
|
|
|
created before setting this to nonzero, will continue to use watchpoint\n\
|
2005-02-18 Andrew Cagney <cagney@gnu.org>
Use add_setshow_zinteger_cmd through out. Re-sync gdbarch.sh
and gdbarch.c.
* breakpoint.c, frame.c, gdb-events.sh, gdbarch.sh: Update.
* gdbtypes.c, infrun.c, linux-nat.c, maint.c, monitor.c: Update.
* pa64solib.c, parse.c, remote-mips.c, ser-go32.c: Update.
* serial.c, solib-frv.c, somsolib.c, target.c, top.c: Update.
* varobj.c, cli/cli-cmds.c: Update.
* gdbarch.c, gdb-events.c: Regenerate.
2005-02-18 19:58:56 +01:00
|
|
|
|
hardware.)"),
|
|
|
|
|
NULL,
|
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 14:51:36 +01:00
|
|
|
|
show_can_use_hw_watchpoints,
|
2005-02-18 Andrew Cagney <cagney@gnu.org>
Use add_setshow_zinteger_cmd through out. Re-sync gdbarch.sh
and gdbarch.c.
* breakpoint.c, frame.c, gdb-events.sh, gdbarch.sh: Update.
* gdbtypes.c, infrun.c, linux-nat.c, maint.c, monitor.c: Update.
* pa64solib.c, parse.c, remote-mips.c, ser-go32.c: Update.
* serial.c, solib-frv.c, somsolib.c, target.c, top.c: Update.
* varobj.c, cli/cli-cmds.c: Update.
* gdbarch.c, gdb-events.c: Regenerate.
2005-02-18 19:58:56 +01:00
|
|
|
|
&setlist, &showlist);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
can_use_hw_watchpoints = 1;
|
2004-02-27 00:46:47 +01:00
|
|
|
|
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_prefix_cmd ("breakpoint", class_maintenance, set_breakpoint_cmd, _("\
|
2004-02-27 00:46:47 +01:00
|
|
|
|
Breakpoint specific settings\n\
|
|
|
|
|
Configure various breakpoint-specific variables such as\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
pending breakpoint behavior"),
|
2004-02-27 00:46:47 +01:00
|
|
|
|
&breakpoint_set_cmdlist, "set breakpoint ",
|
|
|
|
|
0/*allow-unknown*/, &setlist);
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
add_prefix_cmd ("breakpoint", class_maintenance, show_breakpoint_cmd, _("\
|
2004-02-27 00:46:47 +01:00
|
|
|
|
Breakpoint specific settings\n\
|
|
|
|
|
Configure various breakpoint-specific variables such as\n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
|
pending breakpoint behavior"),
|
2004-02-27 00:46:47 +01:00
|
|
|
|
&breakpoint_show_cmdlist, "show breakpoint ",
|
|
|
|
|
0/*allow-unknown*/, &showlist);
|
|
|
|
|
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_setshow functions, replace "PRINT:" comment prefix
with "FIXME: i18n:".
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* cris-tdep.c, dwarf2read.c, frame.c, hppa-tdep.c: Update.
* infcall.c, m32r-rom.c, maint.c, mips-tdep.c: Update.
* nto-tdep.c, observer.c, remote-rdi.c, remote.c: Update.
* target.c, cli/cli-logging.c: Update.
2005-02-14 17:18:43 +01:00
|
|
|
|
add_setshow_auto_boolean_cmd ("pending", no_class,
|
|
|
|
|
&pending_break_support, _("\
|
|
|
|
|
Set debugger's behavior regarding pending breakpoints."), _("\
|
|
|
|
|
Show debugger's behavior regarding pending breakpoints."), _("\
|
2004-02-28 17:56:12 +01:00
|
|
|
|
If on, an unrecognized breakpoint location will cause gdb to create a\n\
|
|
|
|
|
pending breakpoint. If off, an unrecognized breakpoint location results in\n\
|
|
|
|
|
an error. If auto, an unrecognized breakpoint location results in a\n\
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_setshow functions, replace "PRINT:" comment prefix
with "FIXME: i18n:".
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* cris-tdep.c, dwarf2read.c, frame.c, hppa-tdep.c: Update.
* infcall.c, m32r-rom.c, maint.c, mips-tdep.c: Update.
* nto-tdep.c, observer.c, remote-rdi.c, remote.c: Update.
* target.c, cli/cli-logging.c: Update.
2005-02-14 17:18:43 +01:00
|
|
|
|
user-query to see if a pending breakpoint should be created."),
|
2005-02-17 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (add_setshow_cmd_full, add_setshow_enum_cmd)
(add_setshow_auto_boolean_cmd, add_setshow_boolean_cmd)
(add_setshow_filename_cmd, add_setshow_string_cmd)
(add_setshow_uinteger_cmd, add_setshow_zinteger_cmd): Delete
fprint_setshow parameter.
* command.h (fprint_setshow_ftype): Delete.
(add_setshow_cmd_full, add_setshow_enum_cmd)
(add_setshow_auto_boolean_cmd, add_setshow_boolean_cmd)
(add_setshow_filename_cmd, add_setshow_string_cmd)
(add_setshow_uinteger_cmd, add_setshow_zinteger_cmd): Delete
fprint_setshow parameter.
* aix-thread.c, alpha-tdep.c, arm-tdep.c, breakpoint.c: Update.
* complaints.c, cris-tdep.c, dwarf2read.c, frame.c: Update.
* hppa-tdep.c, infcall.c, m32r-rom.c, maint.c: Update.
* mips-tdep.c, nto-tdep.c, observer.c, remote-rdi.c: Update
* remote.c, target.c, cli/cli-logging.c: Update.
2005-02-17 14:49:56 +01:00
|
|
|
|
NULL,
|
2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
* valprint.c (_initialize_valprint, show_print_max)
(show_stop_print_at_null, show_repeat_count_threshold)
(show_prettyprint_structs, show_unionprint)
(show_prettyprint_arrays, show_addressprint, show_input_radix)
(show_output_radix): Ditto.
* valops.c (_initialize_valops, show_overload_resolution): Ditto.
* utils.c (initialize_utils, show_chars_per_line)
(show_lines_per_page, show_demangle, show_pagination_enabled)
(show_sevenbit_strings, show_asm_demangle): Ditto
* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
(show_tui_border_mode, show_tui_active_border_mode): Ditto.
* top.c (init_main, show_new_async_prompt)
(show_async_command_editing_p, show_write_history_p)
(show_history_size, show_history_filename, show_caution)
(show_annotation_level, init_main): Ditto.
* target.c (initialize_targets, show_targetdebug)
(show_trust_readonly): Ditto.
* symfile.c (_initialize_symfile, show_symbol_reloading)
(show_ext_args, show_download_write_size)
(show_debug_file_directory): Ditto.
* source.c (_initialize_source, show_lines_to_list): Ditto.
* solib.c (_initialize_solib, show_auto_solib_add)
(show_solib_search_path): Ditto.
* p-valprint.c (_initialize_pascal_valprint)
(show_pascal_static_field_print): Ditto.
* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
(show_print_symbol_filename): Add and update.
* parse.c (_initialize_parse, show_expressiondebug): Dito.
* observer.c (_initialize_observer, show_observer_debug): Dito.
* maint.c (_initialize_maint_cmds, show_watchdog)
(show_maintenance_profile_p): Dito.
* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
* infrun.c (_initialize_infrun, show_debug_infrun)
(show_stop_on_solib_events, show_follow_fork_mode_string)
(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
(show_unwind_on_signal_p): Ditto.
* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
(_initialize_gdbtypes, show_overload_debug): Ditto.
* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
(show_gdb_events_debug): Ditto.
* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
(_initialize_gdbarch): Ditto.
* frame.c (_initialize_frame, show_backtrace_past_main)
(show_backtrace_past_entry, show_backtrace_limit)
(show_frame_debug): Ditto.
* exec.c (_initialize_exec, show_write_files): Ditto.
* dwarf2read.c (_initialize_dwarf2_read)
(show_dwarf2_max_cache_age): Ditto.
* demangle.c (_initialize_demangler)
(show_demangling_style_names): Ditto.
* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
* cp-valprint.c (show_static_field_print)
(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
* cli/cli-logging.c (_initialize_cli_logging)
(show_logging_overwrite, show_logging_redirect)
(show_logging_filename): Ditto.
* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
(init_cli_cmds, show_baud_rate, show_remote_debug)
(show_remote_timeout, show_max_user_call_depth): Ditto.
* charset.c (show_host_charset_name, show_target_charset_name)
(initialize_charset): Ditto.
* breakpoint.c (show_can_use_hw_watchpoints)
(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 14:51:36 +01:00
|
|
|
|
show_pending_break_support,
|
2004-02-28 17:56:12 +01:00
|
|
|
|
&breakpoint_set_cmdlist,
|
|
|
|
|
&breakpoint_show_cmdlist);
|
2004-02-27 00:46:47 +01:00
|
|
|
|
|
|
|
|
|
pending_break_support = AUTO_BOOLEAN_AUTO;
|
2006-11-22 11:43:34 +01:00
|
|
|
|
|
|
|
|
|
add_setshow_boolean_cmd ("auto-hw", no_class,
|
|
|
|
|
&automatic_hardware_breakpoints, _("\
|
|
|
|
|
Set automatic usage of hardware breakpoints."), _("\
|
|
|
|
|
Show automatic usage of hardware breakpoints."), _("\
|
|
|
|
|
If set, the debugger will automatically use hardware breakpoints for\n\
|
|
|
|
|
breakpoints set with \"break\" but falling in read-only memory. If not set,\n\
|
|
|
|
|
a warning will be emitted for such breakpoints."),
|
|
|
|
|
NULL,
|
|
|
|
|
show_automatic_hardware_breakpoints,
|
|
|
|
|
&breakpoint_set_cmdlist,
|
|
|
|
|
&breakpoint_show_cmdlist);
|
2008-04-24 12:21:45 +02:00
|
|
|
|
|
|
|
|
|
add_setshow_boolean_cmd ("always-inserted", class_support,
|
|
|
|
|
&always_inserted_mode, _("\
|
|
|
|
|
Set mode for inserting breakpoints."), _("\
|
|
|
|
|
Show mode for inserting breakpoints."), _("\
|
|
|
|
|
When this mode is off (which is the default), breakpoints are inserted in\n\
|
|
|
|
|
inferior when it is resumed, and removed when execution stops. When this\n\
|
|
|
|
|
mode is on, breakpoints are inserted immediately and removed only when\n\
|
|
|
|
|
the user deletes the breakpoint."),
|
|
|
|
|
NULL,
|
|
|
|
|
&show_always_inserted_mode,
|
|
|
|
|
&breakpoint_set_cmdlist,
|
|
|
|
|
&breakpoint_show_cmdlist);
|
2006-11-22 11:43:34 +01:00
|
|
|
|
|
|
|
|
|
automatic_hardware_breakpoints = 1;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|