This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] disassemble-next-line
- From: Tom Tromey <tromey at redhat dot com>
- To: teawater <teawater at gmail dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>, Doug Evans <dje at google dot com>, Pedro Alves <pedro at codesourcery dot com>, Daniel Jacobowitz <drow at false dot org>, "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 09 Mar 2009 09:26:03 -0600
- Subject: Re: [RFC] disassemble-next-line
- References: <daef60380903072134n381d57a8ob82ac9c777d97bff@mail.gmail.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "teawater" == teawater <teawater@gmail.com> writes:
teawater> This is the patch for the function to output assembly codes
teawater> for next line.
teawater> +/* If ON, GDB will output the assembly codes of next line.
teawater> + If OFF, GDB will not do it.
teawater> + doesn't support it, GDB will instead use the traditional
I think this third line should be removed.
teawater> +/* Show assembly codes; stub for catch_errors. */
teawater> +
teawater> +struct gdb_disassembly_stub_args
teawater> +{
teawater> + int how_many;
teawater> + CORE_ADDR low;
teawater> + CORE_ADDR high;
teawater> +};
teawater> +
teawater> +static int
teawater> +gdb_disassembly_stub (void *args)
teawater> +{
teawater> + struct gdb_disassembly_stub_args *p = args;
teawater> + gdb_disassembly (uiout, 0, 0, 0, p->how_many, p->low, p->high);
teawater> + return 0;
IMO, in this case it would be shorter, and clearer, to use TRY_CATCH
at the call site rather than catch_errors. What do you think?
teawater> + /* If disassemble-next-line is set to auto or on and doesn't have
teawater> + line message, output current instructions. */
"a line message"
teawater> + /* If disassemble-next-line is set to on and there is line
teawater> + messages, output assembly codes for next line. */
"there are line messages"
teawater> + add_setshow_enum_cmd ("disassemble-next-line", class_run,
teawater> + disassemble_next_line_enum,
teawater> + &disassemble_next_line, _("\
teawater> +Set debugger's willingness to use disassemble-next-line."), _("\
This text seems circular.
Instead it should briefly describe what the option does.
teawater> +Show debugger's willingness to use disassemble-next-line."), _("\
teawater> +If on, gdb will output the assembly codes of next line.\n\
This also reads strangely, but I don't have a suggestion for what it
ought to say. I think it should at least say when the assembly will
be displayed. "assembly codes" in particular sounds odd to me.
teawater> +If auto (which is the default), gdb will output a assembly code\n\
teawater> +at current address if there is not line message."),
"at the current address"
The line message bit could use rewording as well; at least s/not/no/.
Tom