Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions gdb_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,23 +1012,25 @@ gdb_set_crash_scope(ulong vaddr, char *arg)
char name[BUFSIZE];
struct load_module *lm;

if (!is_kernel_text(vaddr)) {
error(INFO, "invalid text address: %s\n", arg);
return FALSE;
}
if (vaddr) {
if (!is_kernel_text(vaddr)) {
error(INFO, "invalid text address: %s\n", arg);
return FALSE;
}

if (module_symbol(vaddr, NULL, &lm, name, 0)) {
if (!(lm->mod_flags & MOD_LOAD_SYMS)) {
error(INFO, "attempting to find/load \"%s\" module debuginfo\n",
lm->mod_name);
if (!load_module_symbols_helper(lm->mod_name)) {
error(INFO, "cannot find/load \"%s\" module debuginfo\n",
if (module_symbol(vaddr, NULL, &lm, name, 0)) {
if (!(lm->mod_flags & MOD_LOAD_SYMS)) {
error(INFO, "attempting to find/load \"%s\" module debuginfo\n",
lm->mod_name);
return FALSE;
if (!load_module_symbols_helper(lm->mod_name)) {
error(INFO, "cannot find/load \"%s\" module debuginfo\n",
lm->mod_name);
return FALSE;
}
}
}
} else if (kt->flags2 & KASLR)
vaddr -= (kt->relocate * -1);
} else if (kt->flags2 & KASLR)
vaddr -= (kt->relocate * -1);
}

req->command = GNU_SET_CRASH_BLOCK;
req->addr = vaddr;
Expand Down
2 changes: 1 addition & 1 deletion help.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ char *help_set[] = {
" of data structures; the \"text-addr\" argument",
" must be a kernel or module text address, which",
" may be expressed symbolically or as a hexadecimal",
" value.",
" value; set scope 0 to un-set.",
" offline show | hide show or hide command output that is associated",
" with offline cpus.",
" redzone on | off if on, CONFIG_SLUB object addresses displayed by",
Expand Down