mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-20 04:09:40 +08:00
2002-04-07 Elena Zannoni <ezannoni@redhat.com>
* mi-cmd-disas.c: Run through indent.
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2002-04-07 Elena Zannoni <ezannoni@redhat.com>
|
||||
|
||||
* mi-cmd-disas.c: Run through indent.
|
||||
|
||||
2002-04-07 Elena Zannoni <ezannoni@redhat.com>
|
||||
|
||||
* mi-cmd-disas.c (dump_insns): New function.
|
||||
|
@ -166,8 +166,7 @@ do_mixed_source_and_assembly (struct disassemble_info *di, int nlines,
|
||||
|
||||
for (; i < nlines - 1 && le[i].pc < high; i++)
|
||||
{
|
||||
if (le[i].line == le[i + 1].line
|
||||
&& le[i].pc == le[i + 1].pc)
|
||||
if (le[i].line == le[i + 1].line && le[i].pc == le[i + 1].pc)
|
||||
continue; /* Ignore duplicates */
|
||||
|
||||
/* Skip any end-of-function markers. */
|
||||
@ -185,8 +184,7 @@ do_mixed_source_and_assembly (struct disassemble_info *di, int nlines,
|
||||
/* If we're on the last line, and it's part of the function,
|
||||
then we need to get the end pc in a special way. */
|
||||
|
||||
if (i == nlines - 1
|
||||
&& le[i].pc < high)
|
||||
if (i == nlines - 1 && le[i].pc < high)
|
||||
{
|
||||
mle[newlines].line = le[i].line;
|
||||
mle[newlines].start_pc = le[i].pc;
|
||||
@ -227,7 +225,8 @@ do_mixed_source_and_assembly (struct disassemble_info *di, int nlines,
|
||||
for (; next_line < mle[i].line; next_line++)
|
||||
{
|
||||
ui_out_tuple_begin (uiout, "src_and_asm_line");
|
||||
print_source_lines (symtab, next_line, next_line + 1, 0);
|
||||
print_source_lines (symtab, next_line, next_line + 1,
|
||||
0);
|
||||
ui_out_list_begin (uiout, "line_asm_insn");
|
||||
ui_out_list_end (uiout);
|
||||
ui_out_tuple_end (uiout);
|
||||
@ -284,9 +283,7 @@ enum mi_cmd_result
|
||||
do_disassembly (char *file_string,
|
||||
int line_num,
|
||||
int mixed_source_and_assembly,
|
||||
int how_many,
|
||||
CORE_ADDR low,
|
||||
CORE_ADDR high)
|
||||
int how_many, CORE_ADDR low, CORE_ADDR high)
|
||||
{
|
||||
static disassemble_info di;
|
||||
static int di_initialized;
|
||||
@ -419,8 +416,7 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
|
||||
{
|
||||
FILE_OPT, LINE_OPT, NUM_OPT, START_OPT, END_OPT
|
||||
};
|
||||
static struct mi_opt opts[] =
|
||||
{
|
||||
static struct mi_opt opts[] = {
|
||||
{"f", FILE_OPT, 1},
|
||||
{"l", LINE_OPT, 1},
|
||||
{"n", NUM_OPT, 1},
|
||||
@ -470,10 +466,12 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
|
||||
if (!((line_seen && file_seen && num_seen && !start_seen && !end_seen)
|
||||
|| (line_seen && file_seen && !num_seen && !start_seen && !end_seen)
|
||||
|| (!line_seen && !file_seen && !num_seen && start_seen && end_seen)))
|
||||
error ("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n howmany]] | [-s startaddr -e endaddr]) [--] mixed_mode.");
|
||||
error
|
||||
("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n howmany]] | [-s startaddr -e endaddr]) [--] mixed_mode.");
|
||||
|
||||
if (argc != 1)
|
||||
error ("mi_cmd_disassemble: Usage: [-f filename -l linenum [-n howmany]] [-s startaddr -e endaddr] [--] mixed_mode.");
|
||||
error
|
||||
("mi_cmd_disassemble: Usage: [-f filename -l linenum [-n howmany]] [-s startaddr -e endaddr] [--] mixed_mode.");
|
||||
|
||||
mixed_source_and_assembly = atoi (argv[0]);
|
||||
if ((mixed_source_and_assembly != 0) && (mixed_source_and_assembly != 1))
|
||||
@ -496,9 +494,6 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
|
||||
|
||||
retval = do_disassembly (file_string,
|
||||
line_num,
|
||||
mixed_source_and_assembly,
|
||||
how_many,
|
||||
low,
|
||||
high);
|
||||
mixed_source_and_assembly, how_many, low, high);
|
||||
return retval;
|
||||
}
|
||||
|
Reference in New Issue
Block a user