aboutsummaryrefslogtreecommitdiff
path: root/gdb/disasm.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-01-07 19:36:19 +0000
committerMichael Snyder <msnyder@vmware.com>2011-01-07 19:36:19 +0000
commit0963b4bd458eab010b3b19c9ffd8eb790f2cd06c (patch)
tree42dcaac763368854d136093c43a40333b751d391 /gdb/disasm.c
parent87973e9f82d516acbf4f484ba56febe17a3b312d (diff)
downloadgdb-0963b4bd458eab010b3b19c9ffd8eb790f2cd06c.zip
gdb-0963b4bd458eab010b3b19c9ffd8eb790f2cd06c.tar.gz
gdb-0963b4bd458eab010b3b19c9ffd8eb790f2cd06c.tar.bz2
2011-01-07 Michael Snyder <msnyder@vmware.com>
* ada-lang.c: Comment cleanup, mostly periods and spaces. * ada-lang.h: Ditto. * ada-tasks.c: Ditto. * ada-valprint.c: Ditto. * aix-threads.c: Ditto. * alpha-linux-nat.c: Ditto. * alpha-linux-tdep.c: Ditto. * alpha-mdebug-tdep.c: Ditto. * alpha-nat.c: Ditto. * alpha-osf1-tdep.c: Ditto. * alpha-tdep.c: Ditto. * alphabsd-nat.c: Ditto. * alphabsd-tdep.c: Ditto. * amd64-darwin-tdep.c: Ditto. * amd64-linux-nat.c: Ditto. * amd64-linux-tdep.c: Ditto. * amd64-sol2-tdep.c: Ditto. * amd64-tdep.c: Ditto. * amd64-fbsd-tdep.c: Ditto. * amd64-nbsd-tdep.c: Ditto. * amd64-obsd-tdep.c: Ditto. * amd64-linux-nat.c: Ditto. * amd64-linux-tdep.c: Ditto. * arm-tdep.c: Ditto. * arm-tdep.h: Ditto. * armnbsd-nat.c: Ditto. * avr-tdep.c: Ditto. * bfin-tdep.c: Ditto. * bsd-kvm.c: Ditto. * c-typeprintc: Ditto. * c-valprint.c: Ditto. * coff-pe-read.h: Ditto. * coffreead.c: Ditto. * cris-tdep.c: Ditto. * d-lang.c: Ditto. * darwin-nat-info.c: Ditto. * darwin-nat.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * dcache.c: Ditto. * dcache.h: Ditto. * dec-thread.c: Ditto. * defs.h: Ditto. * demangle.c: Ditto. * dicos-tdep.c: Ditto. * dictionary.c: Ditto. * dictionary.h: Ditto. * dink32-rom.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dsrec.c: Ditto. * dummy-frame.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * environ.c: Ditto. * eval.c: Ditto. * event-top.h: Ditto. * exceptions.c: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-exp.y: Ditto. * f-lang.c: Ditto. * f-lang.h: Ditto. * f-typeprint.c: Ditto. * f-valprint.c: Ditto. * fbsd-nat.c: Ditto. * findvar.c: Ditto. * fork-child.c: Ditto. * frame.c: Ditto. * frame.h: Ditto. * frv-linux-tdep.c: Ditto. * frv-tdep.c: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_string.h: Ditto. * gdb_thread_db.h: Ditto. * gdb_wait.h: Ditto. * gdbarch.sh: Ditto. * gdbcore.h: Ditto. * gdbthread.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * gnu-nat.c: Ditto. * gnu-nat.h: Ditto. * gnu-v2-abi.c: Ditto. * gnu-v3-abi.c: Ditto. * go32-nat.c: Ditto. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate.
Diffstat (limited to 'gdb/disasm.c')
-rw-r--r--gdb/disasm.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/gdb/disasm.c b/gdb/disasm.c
index cdd1d82..096cec4 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -29,7 +29,7 @@
/* Disassemble functions.
FIXME: We should get rid of all the duplicate code in gdb that does
- the same thing: disassemble_command() and the gdbtk variation. */
+ the same thing: disassemble_command() and the gdbtk variation. */
/* This Structure is used to store line number information.
We need a different sort of line table from the normal one cuz we can't
@@ -121,7 +121,7 @@ dump_insns (struct gdbarch *gdbarch, struct ui_out *uiout,
&line, &unmapped))
{
/* We don't care now about line, filename and
- unmapped. But we might in the future. */
+ unmapped. But we might in the future. */
ui_out_text (uiout, " <");
if ((flags & DISASSEMBLY_OMIT_FNAME) == 0)
ui_out_field_string (uiout, "func-name", name);
@@ -168,6 +168,7 @@ dump_insns (struct gdbarch *gdbarch, struct ui_out *uiout,
function to the user. This means that things are presented
in source order, with (possibly) out of order assembly
immediately following. */
+
static void
do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
struct disassemble_info *di, int nlines,
@@ -203,7 +204,7 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
for (; i < nlines - 1 && le[i].pc < high; i++)
{
if (le[i].line == le[i + 1].line && le[i].pc == le[i + 1].pc)
- continue; /* Ignore duplicates */
+ continue; /* Ignore duplicates. */
/* Skip any end-of-function markers. */
if (le[i].line == 0)
@@ -230,7 +231,7 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
}
/* Now, sort mle by line #s (and, then by addresses within
- lines). */
+ lines). */
if (out_of_order)
qsort (mle, newlines, sizeof (struct dis_line_entry), compare_lines);
@@ -248,7 +249,7 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
{
if (next_line != 0)
{
- /* Just one line to print. */
+ /* Just one line to print. */
if (next_line == mle[i].line)
{
ui_out_tuple_chain
@@ -258,7 +259,7 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
}
else
{
- /* Several source lines w/o asm instructions associated. */
+ /* Several source lines w/o asm instructions associated. */
for (; next_line < mle[i].line; next_line++)
{
struct cleanup *ui_out_list_chain_line;
@@ -276,7 +277,7 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
do_cleanups (ui_out_tuple_chain_line);
}
/* Print the last line and leave list open for
- asm instructions to be added. */
+ asm instructions to be added. */
ui_out_tuple_chain
= make_cleanup_ui_out_tuple_begin_end (uiout,
"src_and_asm_line");
@@ -384,12 +385,12 @@ gdb_disassembly (struct gdbarch *gdbarch, struct ui_out *uiout,
struct ui_stream *stb = ui_out_stream_new (uiout);
struct cleanup *cleanups = make_cleanup_ui_out_stream_delete (stb);
struct disassemble_info di = gdb_disassemble_info (gdbarch, stb->stream);
- /* To collect the instruction outputted from opcodes. */
+ /* To collect the instruction outputted from opcodes. */
struct symtab *symtab = NULL;
struct linetable_entry *le = NULL;
int nlines = -1;
- /* Assume symtab is valid for whole PC range */
+ /* Assume symtab is valid for whole PC range. */
symtab = find_pc_symtab (low);
if (symtab != NULL && symtab->linetable != NULL)