old-cross-binutils/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
..
ChangeLog-1999-2003
mi-cmd-break.c Mass rename explicit' -> explicit_loc'. 2015-08-13 09:48:12 -07:00
mi-cmd-break.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-cmd-catch.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-cmd-disas.c New /s modifier for the disassemble command. 2015-08-14 21:45:54 -07:00
mi-cmd-env.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-cmd-file.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-cmd-info.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-cmd-stack.c Replace the block_found global with explicit data-flow 2015-08-01 10:55:44 +02:00
mi-cmd-target.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-cmd-var.c C++ keyword cleanliness, mostly auto-generated 2015-02-27 16:33:07 +00:00
mi-cmds.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-cmds.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-common.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-common.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-console.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-console.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-getopt.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-getopt.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-interp.c Split TRY_CATCH into TRY + CATCH 2015-03-07 15:14:14 +00:00
mi-main.c Mostly trivial enum fixes 2015-07-31 13:19:53 -04:00
mi-main.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-out.c Mostly trivial enum fixes 2015-07-31 13:19:53 -04:00
mi-out.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-parse.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-parse.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-symbol-cmds.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00