Correct a warning where the r_debug_state() dummy function used to trigger
a breakpoint in the kernel didn't use the proper argument list. To avoid having to include the userland link.h header everyhwere that sys/linker.h is used, make r_debug_state() a static function in link_elf.c as well.
This commit is contained in:
parent
ff0c1daf6b
commit
ca29467e9a
@ -128,19 +128,22 @@ static int relocate_file(elf_file_t ef);
|
||||
static int link_elf_preload_parse_symbols(elf_file_t ef);
|
||||
|
||||
#ifdef DDB
|
||||
static void r_debug_state(struct r_debug *dummy_one,
|
||||
struct link_map *dummy_two);
|
||||
|
||||
/*
|
||||
* A list of loaded modules for GDB to use for loading symbols.
|
||||
*/
|
||||
struct r_debug r_debug;
|
||||
|
||||
#define GDB_STATE(s) r_debug.r_state = s; r_debug_state();
|
||||
#define GDB_STATE(s) r_debug.r_state = s; r_debug_state(NULL, NULL);
|
||||
|
||||
/*
|
||||
* Function for the debugger to set a breakpoint on to gain control.
|
||||
*/
|
||||
void
|
||||
r_debug_state(void)
|
||||
r_debug_state(struct r_debug *dummy_one __unused,
|
||||
struct link_map *dummy_two __unused)
|
||||
{
|
||||
}
|
||||
|
||||
@ -216,7 +219,7 @@ link_elf_init(void* arg)
|
||||
r_debug.r_brk = r_debug_state;
|
||||
r_debug.r_state = RT_CONSISTENT;
|
||||
|
||||
r_debug_state(); /* say hello to gdb! */
|
||||
r_debug_state(NULL, NULL); /* say hello to gdb! */
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -128,19 +128,22 @@ static int relocate_file(elf_file_t ef);
|
||||
static int link_elf_preload_parse_symbols(elf_file_t ef);
|
||||
|
||||
#ifdef DDB
|
||||
static void r_debug_state(struct r_debug *dummy_one,
|
||||
struct link_map *dummy_two);
|
||||
|
||||
/*
|
||||
* A list of loaded modules for GDB to use for loading symbols.
|
||||
*/
|
||||
struct r_debug r_debug;
|
||||
|
||||
#define GDB_STATE(s) r_debug.r_state = s; r_debug_state();
|
||||
#define GDB_STATE(s) r_debug.r_state = s; r_debug_state(NULL, NULL);
|
||||
|
||||
/*
|
||||
* Function for the debugger to set a breakpoint on to gain control.
|
||||
*/
|
||||
void
|
||||
r_debug_state(void)
|
||||
r_debug_state(struct r_debug *dummy_one __unused,
|
||||
struct link_map *dummy_two __unused)
|
||||
{
|
||||
}
|
||||
|
||||
@ -216,7 +219,7 @@ link_elf_init(void* arg)
|
||||
r_debug.r_brk = r_debug_state;
|
||||
r_debug.r_state = RT_CONSISTENT;
|
||||
|
||||
r_debug_state(); /* say hello to gdb! */
|
||||
r_debug_state(NULL, NULL); /* say hello to gdb! */
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -189,10 +189,6 @@ extern caddr_t preload_search_info(caddr_t _mod, int _inf);
|
||||
extern void preload_delete_name(const char *_name);
|
||||
extern void preload_bootstrap_relocate(vm_offset_t _offset);
|
||||
|
||||
#ifdef DDB
|
||||
extern void r_debug_state(void);
|
||||
#endif
|
||||
|
||||
#ifdef KLD_DEBUG
|
||||
|
||||
extern int kld_debug;
|
||||
|
Loading…
Reference in New Issue
Block a user