old-cross-binutils/gdb/testsuite/gdb.mi
Doug Evans 6ff0ba5f7b New /s modifier for the disassemble command.
The "source centric" /m option to the disassemble command is often
unhelpful, e.g., in the presence of optimized code.
This patch adds a /s modifier that is better.
For one, /m only prints instructions from the originating source file,
leaving out instructions from e.g., inlined functions from other files.

gdb/ChangeLog:

	PR gdb/11833
	* NEWS: Document new /s modifier for the disassemble command.
	* cli/cli-cmds.c (disassemble_command): Add support for /s.
	(_initialize_cli_cmds): Update online docs of disassemble command.
	* disasm.c: #include "source.h".
	(struct deprecated_dis_line_entry): Renamed from dis_line_entry.
	All uses updated.
	(dis_line_entry): New struct.
	(hash_dis_line_entry, eq_dis_line_entry): New functions.
	(allocate_dis_line_table): New functions.
	(maybe_add_dis_line_entry, line_has_code_p): New functions.
	(dump_insns): New arg end_pc.  All callers updated.
	(do_mixed_source_and_assembly_deprecated): Renamed from
	do_mixed_source_and_assembly.  All callers updated.
	(do_mixed_source_and_assembly): New function.
	(gdb_disassembly): Handle /s (DISASSEMBLY_SOURCE).
	* disasm.h (DISASSEMBLY_SOURCE_DEPRECATED): Renamed from
	DISASSEMBLY_SOURCE.  All uses updated.
	(DISASSEMBLY_SOURCE): New macro.
	* mi/mi-cmd-disas.c (mi_cmd_disassemble): New modes 4,5.

gdb/doc/ChangeLog:

	* gdb.texinfo (Machine Code): Update docs for mixed source/assembly
	disassembly.
	(GDB/MI Data Manipulation): Update docs for new disassembly modes.

gdb/testsuite/ChangeLog:

	* gdb.mi/mi-disassemble.exp: Update.
	* gdb.base/disasm-optim.S: New file.
	* gdb.base/disasm-optim.c: New file.
	* gdb.base/disasm-optim.h: New file.
	* gdb.base/disasm-optim.exp: New file.
2015-08-14 21:45:54 -07:00
..
array.f
basics.c
ChangeLog-1999-2003
dw2-ref-missing-frame-func.c
dw2-ref-missing-frame-main.c
dw2-ref-missing-frame.exp
dw2-ref-missing-frame.S
gdb669.exp
gdb680.exp
gdb701.c
gdb701.exp
gdb792.cc
gdb792.exp
gdb2549.exp
Makefile.in
mi-async.exp
mi-basics.exp
mi-break.exp Explicit locations: MI support for explicit locations 2015-08-11 17:09:36 -07:00
mi-breakpoint-changed.exp
mi-catch-load-so.c
mi-catch-load.c
mi-catch-load.exp
mi-cli.exp
mi-cmd-param-changed.exp
mi-condbreak-call-thr-state-mt.c
mi-condbreak-call-thr-state-st.c
mi-condbreak-call-thr-state.c
mi-condbreak-call-thr-state.exp
mi-console.c
mi-console.exp
mi-detach.exp Fix =thread-exited not showing up when detaching (PR 15564) 2015-06-02 15:32:57 -04:00
mi-disassemble.exp New /s modifier for the disassemble command. 2015-08-14 21:45:54 -07:00
mi-dprintf-pending.c Fix MI dprintf-insert not printing on a resolved pending location. 2015-06-12 08:43:17 -04:00
mi-dprintf-pending.exp Fix MI dprintf-insert not printing on a resolved pending location. 2015-06-12 08:43:17 -04:00
mi-dprintf-pendshr.c Fix MI dprintf-insert not printing on a resolved pending location. 2015-06-12 08:43:17 -04:00
mi-dprintf.c Unbuffer all tests that rely on stdio 2015-07-29 11:09:45 +01:00
mi-dprintf.exp Explicit locations: MI support for explicit locations 2015-08-11 17:09:36 -07:00
mi-eval.exp
mi-exit-code.c
mi-exit-code.exp
mi-file-transfer.exp
mi-file.exp
mi-fill-memory.exp
mi-fullname-deleted.exp
mi-hack-cli.exp
mi-i-cmd.exp
mi-info-os.exp
mi-inheritance-syntax-error.cc
mi-inheritance-syntax-error.exp
mi-language.exp
mi-logging.exp
mi-memory-changed.exp
mi-nonstop-exit.exp
mi-nonstop.exp
mi-ns-stale-regcache.exp
mi-nsintrall.exp
mi-nsmoribund.exp
mi-nsthrexec.exp
mi-pending.c gdb.mi/mi-pending.c: Return NULL instead of nothing in thread function 2015-07-27 15:49:24 -04:00
mi-pending.exp
mi-pendshr.c
mi-pendshr2.c
mi-pthreads.exp
mi-read-memory.c
mi-read-memory.exp
mi-record-changed.exp
mi-reg-undefined.c
mi-reg-undefined.exp
mi-reg-undefined.S
mi-regs.exp
mi-return.exp
mi-reverse.exp
mi-simplerun.exp
mi-solib.exp
mi-stack.c
mi-stack.exp
mi-start.c
mi-start.exp
mi-stepi.exp
mi-stepn.c
mi-stepn.exp
mi-syn-frame.c
mi-syn-frame.exp
mi-undefined-cmd.exp
mi-until.exp
mi-var-block.exp
mi-var-child-f.exp
mi-var-child.c
mi-var-child.exp
mi-var-cmd.exp
mi-var-cp.cc
mi-var-cp.exp
mi-var-create-rtti.c
mi-var-create-rtti.exp
mi-var-display.exp
mi-var-invalidate.exp
mi-var-list-children-invalid-grandchild.c
mi-var-list-children-invalid-grandchild.exp
mi-var-rtti.cc
mi-var-rtti.exp
mi-vla-c99.exp
mi-watch-nonstop.exp
mi-watch.exp Remove xfail in gdb.mi/mi-watch.exp 2015-07-27 15:02:37 -04:00
mi2-amd64-entry-value.c
mi2-amd64-entry-value.exp
mi2-amd64-entry-value.s
mi2-prompt.exp
mi2-var-child.exp
non-stop-exit.c
non-stop.c
ns-stale-regcache.c
nsintrall.c
nsmoribund.c
nsthrexec.c
pending.c
pendshr1.c
pendshr2.c
pr11022.c
pr11022.exp
pthreads.c
solib-lib.c
solib-main.c
testcmds
until.c
var-cmd.c
vla.c
watch-nonstop.c