* breakpoint.h (create_solib_load_event_breakpoint)
(create_solib_unload_event_breakpoint) (create_fork_event_catchpoint, create_vfork_event_catchpoint) (create_exec_event_catchpoint): Delete declaration. * breakpoint.c (create_solib_load_event_breakpoint) (solib_load_unload_1, create_solib_unload_event_breakpoint): Delete. (create_fork_event_catchpoint, create_vfork_event_catchpoint) (create_exec_event_catchpoint): Make static.
This commit is contained in:
parent
60b0bfbcb3
commit
9b70b9936e
3 changed files with 14 additions and 111 deletions
|
@ -1,3 +1,14 @@
|
|||
2007-11-05 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* breakpoint.h (create_solib_load_event_breakpoint)
|
||||
(create_solib_unload_event_breakpoint)
|
||||
(create_fork_event_catchpoint, create_vfork_event_catchpoint)
|
||||
(create_exec_event_catchpoint): Delete declaration.
|
||||
* breakpoint.c (create_solib_load_event_breakpoint)
|
||||
(solib_load_unload_1, create_solib_unload_event_breakpoint): Delete.
|
||||
(create_fork_event_catchpoint, create_vfork_event_catchpoint)
|
||||
(create_exec_event_catchpoint): Make static.
|
||||
|
||||
2007-11-05 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* breakpoint.h (set_breakpoint_sal): Remove declaration.
|
||||
|
|
103
gdb/breakpoint.c
103
gdb/breakpoint.c
|
@ -169,11 +169,6 @@ static void awatch_command (char *, int);
|
|||
|
||||
static void do_enable_breakpoint (struct breakpoint *, enum bpdisp);
|
||||
|
||||
static void solib_load_unload_1 (char *hookname,
|
||||
int tempflag,
|
||||
char *dll_pathname,
|
||||
char *cond_string, enum bptype bp_kind);
|
||||
|
||||
static void create_fork_vfork_event_catchpoint (int tempflag,
|
||||
char *cond_string,
|
||||
enum bptype bp_kind);
|
||||
|
@ -4701,98 +4696,6 @@ disable_breakpoints_in_unloaded_shlib (struct so_list *solib)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
solib_load_unload_1 (char *hookname, int tempflag, char *dll_pathname,
|
||||
char *cond_string, enum bptype bp_kind)
|
||||
{
|
||||
struct breakpoint *b;
|
||||
struct symtabs_and_lines sals;
|
||||
struct cleanup *old_chain;
|
||||
struct cleanup *canonical_strings_chain = NULL;
|
||||
char *addr_start = hookname;
|
||||
char *addr_end = NULL;
|
||||
char **canonical = (char **) NULL;
|
||||
int thread = -1; /* All threads. */
|
||||
|
||||
/* Set a breakpoint on the specified hook. */
|
||||
sals = decode_line_1 (&hookname, 1, (struct symtab *) NULL,
|
||||
0, &canonical, NULL);
|
||||
addr_end = hookname;
|
||||
|
||||
if (sals.nelts == 0)
|
||||
{
|
||||
warning (_("Unable to set a breakpoint on dynamic linker callback.\n"
|
||||
"Suggest linking with /opt/langtools/lib/end.o.\n"
|
||||
"GDB will be unable to track shl_load/shl_unload calls."));
|
||||
return;
|
||||
}
|
||||
if (sals.nelts != 1)
|
||||
{
|
||||
warning (_("Unable to set unique breakpoint on dynamic linker callback.\n"
|
||||
"GDB will be unable to track shl_load/shl_unload calls."));
|
||||
return;
|
||||
}
|
||||
|
||||
/* Make sure that all storage allocated in decode_line_1 gets freed
|
||||
in case the following errors out. */
|
||||
old_chain = make_cleanup (xfree, sals.sals);
|
||||
if (canonical != (char **) NULL)
|
||||
{
|
||||
make_cleanup (xfree, canonical);
|
||||
canonical_strings_chain = make_cleanup (null_cleanup, 0);
|
||||
if (canonical[0] != NULL)
|
||||
make_cleanup (xfree, canonical[0]);
|
||||
}
|
||||
|
||||
resolve_sal_pc (&sals.sals[0]);
|
||||
|
||||
/* Remove the canonical strings from the cleanup, they are needed below. */
|
||||
if (canonical != (char **) NULL)
|
||||
discard_cleanups (canonical_strings_chain);
|
||||
|
||||
b = set_raw_breakpoint (sals.sals[0], bp_kind);
|
||||
set_breakpoint_count (breakpoint_count + 1);
|
||||
b->number = breakpoint_count;
|
||||
b->cond_string = (cond_string == NULL) ?
|
||||
NULL : savestring (cond_string, strlen (cond_string));
|
||||
b->thread = thread;
|
||||
|
||||
if (canonical != (char **) NULL && canonical[0] != NULL)
|
||||
b->addr_string = canonical[0];
|
||||
else if (addr_start)
|
||||
b->addr_string = savestring (addr_start, addr_end - addr_start);
|
||||
|
||||
b->enable_state = bp_enabled;
|
||||
b->disposition = tempflag ? disp_del : disp_donttouch;
|
||||
|
||||
if (dll_pathname == NULL)
|
||||
b->dll_pathname = NULL;
|
||||
else
|
||||
{
|
||||
b->dll_pathname = (char *) xmalloc (strlen (dll_pathname) + 1);
|
||||
strcpy (b->dll_pathname, dll_pathname);
|
||||
}
|
||||
|
||||
mention (b);
|
||||
do_cleanups (old_chain);
|
||||
}
|
||||
|
||||
void
|
||||
create_solib_load_event_breakpoint (char *hookname, int tempflag,
|
||||
char *dll_pathname, char *cond_string)
|
||||
{
|
||||
solib_load_unload_1 (hookname, tempflag, dll_pathname,
|
||||
cond_string, bp_catch_load);
|
||||
}
|
||||
|
||||
void
|
||||
create_solib_unload_event_breakpoint (char *hookname, int tempflag,
|
||||
char *dll_pathname, char *cond_string)
|
||||
{
|
||||
solib_load_unload_1 (hookname, tempflag, dll_pathname,
|
||||
cond_string, bp_catch_unload);
|
||||
}
|
||||
|
||||
static void
|
||||
create_fork_vfork_event_catchpoint (int tempflag, char *cond_string,
|
||||
enum bptype bp_kind)
|
||||
|
@ -4820,19 +4723,19 @@ create_fork_vfork_event_catchpoint (int tempflag, char *cond_string,
|
|||
mention (b);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
create_fork_event_catchpoint (int tempflag, char *cond_string)
|
||||
{
|
||||
create_fork_vfork_event_catchpoint (tempflag, cond_string, bp_catch_fork);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
create_vfork_event_catchpoint (int tempflag, char *cond_string)
|
||||
{
|
||||
create_fork_vfork_event_catchpoint (tempflag, cond_string, bp_catch_vfork);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
create_exec_event_catchpoint (int tempflag, char *cond_string)
|
||||
{
|
||||
struct symtab_and_line sal;
|
||||
|
|
|
@ -829,17 +829,6 @@ extern void remove_thread_event_breakpoints (void);
|
|||
|
||||
extern void disable_breakpoints_in_shlibs (void);
|
||||
|
||||
extern void create_solib_load_event_breakpoint (char *, int, char *, char *);
|
||||
|
||||
extern void create_solib_unload_event_breakpoint (char *, int,
|
||||
char *, char *);
|
||||
|
||||
extern void create_fork_event_catchpoint (int, char *);
|
||||
|
||||
extern void create_vfork_event_catchpoint (int, char *);
|
||||
|
||||
extern void create_exec_event_catchpoint (int, char *);
|
||||
|
||||
/* This function returns TRUE if ep is a catchpoint. */
|
||||
extern int ep_is_catchpoint (struct breakpoint *);
|
||||
|
||||
|
|
Loading…
Reference in a new issue