reordering in this function. */
struct dis_line_entry
- {
- int line;
- CORE_ADDR start_pc;
- CORE_ADDR end_pc;
- };
+{
+ int line;
+ CORE_ADDR start_pc;
+ CORE_ADDR end_pc;
+};
/* This variable determines where memory used for disassembly is read from. */
int gdb_disassemble_from_exec = -1;
}
static int
-dump_insns (disassemble_info *di, CORE_ADDR low, CORE_ADDR high,
+dump_insns (disassemble_info * di, CORE_ADDR low, CORE_ADDR high,
int how_many, struct ui_stream *stb)
{
int num_displayed = 0;
do_mixed_source_and_assembly (struct disassemble_info *di, int nlines,
struct linetable_entry *le,
CORE_ADDR low, CORE_ADDR high,
- struct symtab *symtab,
+ struct symtab *symtab,
int how_many, struct ui_stream *stb)
{
int newlines = 0;
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. */
/* 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;
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);
static void
-do_assembly_only (disassemble_info *di, CORE_ADDR low,
+do_assembly_only (disassemble_info * di, CORE_ADDR low,
CORE_ADDR high, int how_many, struct ui_stream *stb)
{
int num_displayed = 0;
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 line_num,
+ int mixed_source_and_assembly,
+ int how_many, CORE_ADDR low, CORE_ADDR high)
{
static disassemble_info di;
static int di_initialized;
do_assembly_only (&di, low, high, how_many, stb);
else if (mixed_source_and_assembly)
- do_mixed_source_and_assembly (&di, nlines, le, low,
+ do_mixed_source_and_assembly (&di, nlines, le, low,
high, symtab, how_many, stb);
gdb_flush (gdb_stdout);
int optind = 0;
char *optarg;
enum opt
- {
- FILE_OPT, LINE_OPT, NUM_OPT, START_OPT, END_OPT
- };
- static struct mi_opt opts[] =
{
+ FILE_OPT, LINE_OPT, NUM_OPT, START_OPT, END_OPT
+ };
+ static struct mi_opt opts[] = {
{"f", FILE_OPT, 1},
{"l", LINE_OPT, 1},
{"n", NUM_OPT, 1},
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.");
+ || (!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.");
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))
error ("mi_cmd_disassemble: No function contains specified address");
}
- retval = do_disassembly (file_string,
- line_num,
- mixed_source_and_assembly,
- how_many,
- low,
- high);
- return retval;
+ retval = do_disassembly (file_string,
+ line_num,
+ mixed_source_and_assembly, how_many, low, high);
+ return retval;
}