diff options
author | Tom Tromey <tom@tromey.com> | 2023-03-07 18:24:14 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-03-11 08:39:51 -0700 |
commit | 6e6ac32dde61fd3019b05adaeec372eb16c12bff (patch) | |
tree | e2d571fa24a342eeaac29d8eec2600535d7b2248 /gdb/disasm.c | |
parent | 1afdbb1e986157a73a7bf1cf4fa03b9426e824e8 (diff) | |
download | gdb-6e6ac32dde61fd3019b05adaeec372eb16c12bff.zip gdb-6e6ac32dde61fd3019b05adaeec372eb16c12bff.tar.gz gdb-6e6ac32dde61fd3019b05adaeec372eb16c12bff.tar.bz2 |
Add operator< and operator== to linetable_entry
This adds a couple of comparison operators to linetable_entry, and
simplifies both the calls to sort and one other spot that checks for
equality.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/disasm.c')
-rw-r--r-- | gdb/disasm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/disasm.c b/gdb/disasm.c index a040637..49053dc 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -604,7 +604,7 @@ do_mixed_source_and_assembly_deprecated 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] == le[i + 1]) continue; /* Ignore duplicates. */ /* Skip any end-of-function markers. */ |