bf88dd6849
auto-load: Implementation. * NEWS: New descriptions for "info auto-load", "info auto-load gdb-scripts", "info auto-load python-scripts", "info auto-load local-gdbinit" and "info auto-load libthread-db". Deprecate "info auto-load-scripts", "set auto-load-scripts on|off" and "show auto-load-scripts". New description for "set auto-load", "show auto-load", "set auto-load gdb-scripts", "show auto-load gdb-scripts", "set auto-load python-scripts", "show auto-load python-scripts", "set auto-load local-gdbinit", "show auto-load local-gdbinit", "set auto-load libthread-db" and "show auto-load libthread-db". * auto-load.c: Remove include python/python-internal.h. Add includes exceptions.h, cli/cli-script.h, gdbcmd.h, cli/cli-decode.h and cli/cli-setshow.h. (GDB_AUTO_FILE_NAME, source_gdb_script_for_objfile) (auto_load_gdb_scripts, show_auto_load_gdb_scripts): New. (gdbpy_global_auto_load): Rename to ... (global_auto_load): ... here. (auto_load_local_gdbinit, auto_load_local_gdbinit_pathname) (auto_load_local_gdbinit_loaded, show_auto_load_local_gdbinit) (script_language_gdb, source_gdb_script_for_objfile): New. (struct loaded_script): New field language. (hash_loaded_script_entry, eq_loaded_script_entry): Calculate also LANGUAGE. (maybe_add_script): Add parameter language. Drop redundant entry.full_path initialization. Initialize entry.language and (*slot)->language. (auto_load_objfile_script): Change parameter suffix to language. Remove the call of maybe_add_script. Call language->source_script_for_objfile. (load_auto_scripts_for_objfile, struct collect_matching_scripts_data): New. (collect_matching_scripts): Adjust it for struct collect_matching_scripts_data. (auto_load_info_scripts_pattern_nl): New variable. (info_auto_load_scripts): Rename to ... (auto_load_info_scripts): ... here, add parameter language. Adjust it for struct collect_matching_scripts_data. (info_auto_load_gdb_scripts, info_auto_load_local_gdbinit) (set_auto_load_cmd, auto_load_set_cmdlist_get, show_auto_load_cmd) (auto_load_show_cmdlist_get, info_auto_load_cmd) (auto_load_info_cmdlist_get): New. (_initialize_auto_load): Move add_info of "auto-load-scripts" to python/py-auto-load.c. New installment for "set auto-load gdb-scripts", "info auto-load gdb-scripts", "set auto-load local-gdbinit" and "info auto-load local-gdbinit". * auto-load.h (struct script_language): New. (gdbpy_global_auto_load): Rename to ... (global_auto_load): ... here. (auto_load_local_gdbinit, auto_load_local_gdbinit_pathname) (auto_load_local_gdbinit_loaded): New declarations. (maybe_add_script): New parameter language. (auto_load_objfile_script): Change parameter suffix to language. (load_auto_scripts_for_objfile, auto_load_info_scripts_pattern_nl) (auto_load_info_scripts, auto_load_set_cmdlist_get) (auto_load_show_cmdlist_get, auto_load_info_cmdlist_get): New declarations. * linux-thread-db.c: Include auto-load.h and ctype.h. (auto_load_thread_db, show_auto_load_thread_db): New. (struct thread_db_info): New field filename. (delete_thread_db_info): Call xfree for FILENAME. (try_thread_db_load): Initialize FILENAME. (try_thread_db_load_from_pdir, try_thread_db_load_from_dir): Return if !AUTO_LOAD_THREAD_DB. (info_auto_load_libthread_db_compare, info_auto_load_libthread_db): New. (_initialize_thread_db): Install auto_load_thread_db as "set auto-load libthread-db" and install info_auto_load_libthread_db as "info auto-load libthread-db". * main.c (captured_main): Rename gdbpy_global_auto_load to global_auto_load. Initialize AUTO_LOAD_LOCAL_GDBINIT_PATHNAME and AUTO_LOAD_LOCAL_GDBINIT_LOADED. (print_gdb_help): Extend the help for 'local init file'. * python/py-auto-load.c: Remove a comment about gdb scripts extension. (GDBPY_AUTO_SECTION_NAME): Extend the comment it is Python specific. (auto_load_scripts): Rename to ... (auto_load_python_scripts): ... here, update the comment. (gdbpy_load_auto_script_for_objfile): New declaration. (show_auto_load_python_scripts, script_language_python) (gdbpy_load_auto_script_for_objfile): New. (source_section_scripts): Refactor the code. (load_auto_scripts_for_objfile): Rename to ... (gdbpy_load_auto_scripts_for_objfile): ... here, update the auto_load_objfile_script caller, drop GDBPY_GLOBAL_AUTO_LOAD checking. (info_auto_load_python_scripts): New. (gdbpy_initialize_auto_load): New variables cmd and cmd_name. Rename "set auto-load-scripts" to "set auto-load python-scripts". Register "set auto-load-scripts" as its deprecated alias. Register "info auto-load python-scripts". Register "info auto-load-scripts" as its deprecated alias. (load_auto_scripts_for_objfile): Rename to ... (gdbpy_load_auto_scripts_for_objfile): ... here. * python/python.h (load_auto_scripts_for_objfile): Rename to ... (gdbpy_load_auto_scripts_for_objfile): ... here. gdb/doc/ auto-load: Implementation. * gdb.texinfo (Mode Options): New anchor for -nx. (Startup): New anchors for Option -init-eval-command, Home Directory Init File and Init File in the Current Directory during Startup. Mention set auto-load local-gdbinit with a reference. Change the sample code to "set auto-load python-scripts". (Threads): New anchor set libthread-db-search-path. Provide references to libthread_db.so.1 file. (Controlling GDB): New menu item for Auto-loading. (Auto-loading, Init File in the Current Directory) (libthread_db.so.1 file, objfile-gdb.gdb file): New nodes. (Python): Rename the menu item Auto-loading to Python Auto-loading. (Writing a Pretty-Printer, Objfiles In Python): Update the renamed reference. (Auto-loading): Rename to ... (Python Auto-loading): ... here. Change "set auto-load-scripts" to "set auto-load python-scripts", new anchor for it. Change "show auto-load-scripts" to "show auto-load python-scripts", new anchor for it. Change "info auto-load-scripts" to "info auto-load python-scripts", new anchor for it. Change "scripts" to "Python scripts". gdb/testsuite/ auto-load: Implementation. * gdb.base/help.exp (test set height): Increase the height. * gdb.python/py-objfile-script.exp (info auto-load-scripts): Change to ... (info auto-load python-scripts): ... here. * gdb.python/py-section-script.exp (info auto-load-scripts *): Change to ... (info auto-load python-scripts *): ... here. |
||
---|---|---|
.. | ||
comp-dir/subdir | ||
a2-run.exp | ||
advance.c | ||
advance.exp | ||
alias.exp | ||
all-bin.exp | ||
all-types.c | ||
annota1.c | ||
annota1.exp | ||
annota3.c | ||
annota3.exp | ||
anon.c | ||
anon.exp | ||
args.c | ||
args.exp | ||
arithmet.exp | ||
arrayidx.c | ||
arrayidx.exp | ||
assign.exp | ||
async-shell.c | ||
async-shell.exp | ||
async.c | ||
async.exp | ||
attach-pie-misread.c | ||
attach-pie-misread.exp | ||
attach-pie-noexec.c | ||
attach-pie-noexec.exp | ||
attach-twice.c | ||
attach-twice.exp | ||
attach.c | ||
attach.exp | ||
attach2.c | ||
auxv.c | ||
auxv.exp | ||
average.c | ||
bang.exp | ||
bar.c | ||
baz.c | ||
bfp-test.c | ||
bfp-test.exp | ||
bigcore.c | ||
bigcore.exp | ||
bitfields.c | ||
bitfields.exp | ||
bitfields2.c | ||
bitfields2.exp | ||
bitops.exp | ||
branches.c | ||
break-always.c | ||
break-always.exp | ||
break-entry.exp | ||
break-inline.c | ||
break-inline.exp | ||
break-interp-lib.c | ||
break-interp-main.c | ||
break-interp.exp | ||
break-on-linker-gcd-function.cc | ||
break-on-linker-gcd-function.exp | ||
break.c | ||
break.exp | ||
break1.c | ||
breakpoint-shadow.c | ||
breakpoint-shadow.exp | ||
call-ar-st.c | ||
call-ar-st.exp | ||
call-rt-st.c | ||
call-rt-st.exp | ||
call-sc.c | ||
call-sc.exp | ||
call-signal-resume.exp | ||
call-signals.c | ||
call-strs.c | ||
call-strs.exp | ||
callexit.c | ||
callexit.exp | ||
callfuncs.c | ||
callfuncs.exp | ||
catch-load-so.c | ||
catch-load.c | ||
catch-load.exp | ||
catch-syscall.c | ||
catch-syscall.exp | ||
charset-malloc.c | ||
charset.c | ||
charset.exp | ||
checkpoint.c | ||
checkpoint.exp | ||
chng-syms.c | ||
chng-syms.exp | ||
code-expr.exp | ||
code_elim.exp | ||
code_elim1.c | ||
code_elim2.c | ||
commands.exp | ||
completion.exp | ||
complex.c | ||
complex.exp | ||
cond-eval-mode.exp | ||
cond-expr.exp | ||
condbreak.exp | ||
consecutive.c | ||
consecutive.exp | ||
constvars.c | ||
constvars.exp | ||
corefile.exp | ||
coremaker.c | ||
coremaker2.c | ||
cursal.c | ||
cursal.exp | ||
cvexpr.c | ||
cvexpr.exp | ||
d10v.ld | ||
d10vovly.c | ||
dbx.exp | ||
default.exp | ||
define.exp | ||
del.c | ||
del.exp | ||
detach.exp | ||
dfp-exprs.exp | ||
dfp-test.c | ||
dfp-test.exp | ||
disasm-end-cu-1.c | ||
disasm-end-cu-2.c | ||
disasm-end-cu.exp | ||
disp-step-fork.c | ||
disp-step-syscall.exp | ||
disp-step-vfork.c | ||
display.c | ||
display.exp | ||
dmsym.c | ||
dmsym.exp | ||
dmsym_main.c | ||
dump.c | ||
dump.exp | ||
dup-sect.exp | ||
dup-sect.S | ||
echo.exp | ||
ena-dis-br.exp | ||
ending-run.c | ||
ending-run.exp | ||
enum_cond.c | ||
enum_cond.exp | ||
environ.exp | ||
eu-strip-infcall.c | ||
eu-strip-infcall.exp | ||
eval-skip.exp | ||
eval.exp | ||
exe-lock.exp | ||
execd-prog.c | ||
expand-psymtabs.c | ||
expand-psymtabs.exp | ||
exprs.c | ||
exprs.exp | ||
fileio.c | ||
fileio.exp | ||
find.c | ||
find.exp | ||
finish.exp | ||
fixsection.c | ||
fixsection.exp | ||
fixsectshr.c | ||
float.c | ||
float.exp | ||
foll-exec.c | ||
foll-exec.exp | ||
foll-fork.c | ||
foll-fork.exp | ||
foll-vfork.c | ||
foll-vfork.exp | ||
foo.c | ||
fortran-sym-case.c | ||
fortran-sym-case.exp | ||
frame-args.c | ||
frame-args.exp | ||
freebpcmd.c | ||
freebpcmd.exp | ||
fullname.c | ||
fullname.exp | ||
funcargs.c | ||
funcargs.exp | ||
gcore-buffer-overflow.c | ||
gcore-buffer-overflow.exp | ||
gcore.c | ||
gcore.exp | ||
gdb1056.exp | ||
gdb1090.c | ||
gdb1090.exp | ||
gdb1250.c | ||
gdb1250.exp | ||
gdb1555-main.c | ||
gdb1555.c | ||
gdb1555.exp | ||
gdb1821.c | ||
gdb1821.exp | ||
gdb11530.c | ||
gdb11530.exp | ||
gdb11531.c | ||
gdb11531.exp | ||
gdb_history | ||
gdbindex-stabs-dwarf.c | ||
gdbindex-stabs.c | ||
gdbindex-stabs.exp | ||
gdbvars.c | ||
gdbvars.exp | ||
gnu-ifunc-lib.c | ||
gnu-ifunc.c | ||
gnu-ifunc.exp | ||
gnu_vector.c | ||
gnu_vector.exp | ||
grbx.c | ||
hashline1.exp | ||
hashline2.exp | ||
hashline3.exp | ||
hbreak.c | ||
hbreak.exp | ||
hbreak2.exp | ||
help.exp | ||
hook-stop-continue.c | ||
hook-stop-continue.exp | ||
hook-stop-frame.c | ||
hook-stop-frame.exp | ||
huge.c | ||
huge.exp | ||
ifelse.exp | ||
included.c | ||
included.exp | ||
included.h | ||
inferior-died.c | ||
inferior-died.exp | ||
infnan.c | ||
infnan.exp | ||
info-macros.c | ||
info-macros.exp | ||
info-proc.exp | ||
info-target.exp | ||
infoline.c | ||
infoline.exp | ||
int-type.c | ||
interact.exp | ||
interp.c | ||
interp.exp | ||
interrupt.c | ||
interrupt.exp | ||
jit-dlmain.c | ||
jit-main.c | ||
jit-simple.c | ||
jit-simple.exp | ||
jit-so.exp | ||
jit-solib.c | ||
jit.exp | ||
jump.c | ||
jump.exp | ||
kill-after-signal.c | ||
kill-after-signal.exp | ||
label.c | ||
label.exp | ||
langs.exp | ||
langs0.c | ||
langs1.c | ||
langs1.f | ||
langs2.c | ||
langs2.cxx | ||
lineinc.c | ||
lineinc.exp | ||
lineinc1.h | ||
lineinc2.h | ||
lineinc3.h | ||
linespecs.exp | ||
list.exp | ||
list0.c | ||
list0.h | ||
list1.c | ||
logical.exp | ||
long_long.c | ||
long_long.exp | ||
longjmp.c | ||
longjmp.exp | ||
m32r.ld | ||
m32rovly.c | ||
macscp.exp | ||
macscp1.c | ||
macscp2.h | ||
macscp3.h | ||
macscp4.h | ||
maint.exp | ||
Makefile.in | ||
memattr.c | ||
memattr.exp | ||
mips_pro.c | ||
mips_pro.exp | ||
miscexprs.c | ||
miscexprs.exp | ||
morestack.c | ||
morestack.exp | ||
moribund-step.exp | ||
multi-forks.c | ||
multi-forks.exp | ||
nextoverexit.c | ||
nextoverexit.exp | ||
nodebug.c | ||
nodebug.exp | ||
nofield.c | ||
nofield.exp | ||
nostdlib.c | ||
nostdlib.exp | ||
opaque.exp | ||
opaque0.c | ||
opaque1.c | ||
overlays.c | ||
overlays.exp | ||
ovlymgr.c | ||
ovlymgr.h | ||
page.exp | ||
pc-fp.c | ||
pc-fp.exp | ||
pending.c | ||
pending.exp | ||
pendshr.c | ||
permissions.exp | ||
pi.txt | ||
pie-execl.c | ||
pie-execl.exp | ||
pointers.c | ||
pointers.exp | ||
pr10179-a.c | ||
pr10179-b.c | ||
pr10179.exp | ||
pr11022.c | ||
pr11022.exp | ||
prelink-lib.c | ||
prelink.c | ||
prelink.exp | ||
printcmds.c | ||
printcmds.exp | ||
prologue.c | ||
prologue.exp | ||
psymtab.exp | ||
psymtab1.c | ||
psymtab2.c | ||
ptr-typedef.c | ||
ptr-typedef.exp | ||
ptype.c | ||
ptype.exp | ||
ptype1.c | ||
radix.exp | ||
randomize.c | ||
randomize.exp | ||
readline-ask.c | ||
readline-ask.exp | ||
readline-ask.inputrc | ||
readline.exp | ||
recpar.c | ||
recpar.exp | ||
recurse.c | ||
recurse.exp | ||
relational.exp | ||
relativedebug.c | ||
relativedebug.exp | ||
relocate.c | ||
relocate.exp | ||
remote.c | ||
remote.exp | ||
remotetimeout.exp | ||
reread.exp | ||
reread1.c | ||
reread2.c | ||
restore.c | ||
restore.exp | ||
return-nodebug.c | ||
return-nodebug.exp | ||
return-nodebug1.c | ||
return.c | ||
return.exp | ||
return2.c | ||
return2.exp | ||
run.c | ||
save-bp.c | ||
save-bp.exp | ||
savedregs.c | ||
savedregs.exp | ||
scope.exp | ||
scope0.c | ||
scope1.c | ||
sect-cmd.exp | ||
sep-proc.c | ||
sep.c | ||
sep.exp | ||
sepdebug.c | ||
sepdebug.exp | ||
sepdebug2.c | ||
sepsymtab.c | ||
sepsymtab.exp | ||
set-lang-auto.exp | ||
setshow.c | ||
setshow.exp | ||
setvar.c | ||
setvar.exp | ||
shell.exp | ||
shlib-call.exp | ||
shmain.c | ||
shr1.c | ||
shr2.c | ||
shreloc.c | ||
shreloc.exp | ||
shreloc1.c | ||
shreloc2.c | ||
sigall.c | ||
sigall.exp | ||
sigaltstack.c | ||
sigaltstack.exp | ||
sigbpt.c | ||
sigbpt.exp | ||
sigchld.c | ||
sigchld.exp | ||
siginfo-addr.c | ||
siginfo-addr.exp | ||
siginfo-infcall.c | ||
siginfo-infcall.exp | ||
siginfo-obj.c | ||
siginfo-obj.exp | ||
siginfo.c | ||
siginfo.exp | ||
signals.c | ||
signals.exp | ||
signest.c | ||
signest.exp | ||
signull.c | ||
signull.exp | ||
sigrepeat.c | ||
sigrepeat.exp | ||
sigstep.c | ||
sigstep.exp | ||
sizeof.c | ||
sizeof.exp | ||
skip-solib-lib.c | ||
skip-solib-main.c | ||
skip-solib.exp | ||
skip.c | ||
skip.exp | ||
skip1.c | ||
so-disc-shr.c | ||
so-impl-ld.c | ||
so-impl-ld.exp | ||
so-indr-cl.c | ||
so-indr-cl.exp | ||
solib-corrupted.exp | ||
solib-disc.c | ||
solib-disc.exp | ||
solib-display-lib.c | ||
solib-display-main.c | ||
solib-display.exp | ||
solib-nodir.exp | ||
solib-overlap-lib.c | ||
solib-overlap-main.c | ||
solib-overlap.exp | ||
solib-symbol-lib.c | ||
solib-symbol-main.c | ||
solib-symbol.exp | ||
solib-weak.c | ||
solib-weak.exp | ||
solib.c | ||
solib.exp | ||
solib1.c | ||
solib2.c | ||
source-error.gdb | ||
source-test.gdb | ||
source.exp | ||
spu.ld | ||
ss.h | ||
stack-checking.c | ||
stack-checking.exp | ||
start.c | ||
start.exp | ||
step-break.c | ||
step-break.exp | ||
step-bt.c | ||
step-bt.exp | ||
step-line.c | ||
step-line.exp | ||
step-line.inp | ||
step-resume-infcall.c | ||
step-resume-infcall.exp | ||
step-test.c | ||
step-test.exp | ||
store.c | ||
store.exp | ||
structs.c | ||
structs.exp | ||
structs2.c | ||
structs2.exp | ||
structs3.c | ||
structs3.exp | ||
subst.exp | ||
sum.c | ||
symbol-without-target_section.c | ||
symbol-without-target_section.exp | ||
term.c | ||
term.exp | ||
testenv.c | ||
testenv.exp | ||
trace-commands.exp | ||
tui-layout.exp | ||
twice.c | ||
twice.exp | ||
type-opaque-lib.c | ||
type-opaque-main.c | ||
type-opaque.exp | ||
ui-redirect.exp | ||
unload.c | ||
unload.exp | ||
unloadshr.c | ||
unloadshr2.c | ||
until.exp | ||
unwindonsignal.c | ||
unwindonsignal.exp | ||
valgrind-db-attach.c | ||
valgrind-db-attach.exp | ||
value-double-free.c | ||
value-double-free.exp | ||
varargs.c | ||
varargs.exp | ||
vforked-prog.c | ||
volatile.exp | ||
watch-cond-infcall.c | ||
watch-cond-infcall.exp | ||
watch-cond.c | ||
watch-cond.exp | ||
watch-non-mem.c | ||
watch-non-mem.exp | ||
watch-read.c | ||
watch-read.exp | ||
watch-vfork.c | ||
watch-vfork.exp | ||
watch_thread_num.c | ||
watch_thread_num.exp | ||
watchpoint-cond-gone-stripped.c | ||
watchpoint-cond-gone.c | ||
watchpoint-cond-gone.exp | ||
watchpoint-delete.c | ||
watchpoint-delete.exp | ||
watchpoint-hw-hit-once.c | ||
watchpoint-hw-hit-once.exp | ||
watchpoint-hw.c | ||
watchpoint-hw.exp | ||
watchpoint-solib-shr.c | ||
watchpoint-solib.c | ||
watchpoint-solib.exp | ||
watchpoint.c | ||
watchpoint.exp | ||
watchpoints.c | ||
watchpoints.exp | ||
wchar.c | ||
wchar.exp | ||
weaklib1.c | ||
weaklib2.c | ||
whatis-exp.exp | ||
whatis.c | ||
whatis.exp |