From: "Andrew Burgess (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: gdb-patches@sourceware.org
Cc: Christian Biesinger <cbiesinger@google.com>
Subject: [review v2] gdb: Don't reorder line table entries too much when sorting.
Date: Fri, 08 Nov 2019 15:04:00 -0000 [thread overview]
Message-ID: <20191108150410.3763225B28@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1573172616000.Ia0309494be4cfd9dcc554f30209477f5f040b21b@gnutoolchain-gerrit.osci.io>
Andrew Burgess has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/526
......................................................................
Patch Set 2:
(1 comment)
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/526/1/gdb/buildsym.c
File gdb/buildsym.c:
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/526/1/gdb/buildsym.c@957
PS1, Line 957:
902 | buildsym_compunit::end_symtab_with_blockvector (struct block *static_block,
| ...
952 | return true;
953 |
954 | if (ln1.pc > ln2.pc)
955 | return false;
956 |
957 > /* For line table entries at the same address we don't want
958 | to reorder them. */
959 | ptrdiff_t off1 = &ln1 - &subfile->line_vector->item[0];
960 | ptrdiff_t off2 = &ln2 - &subfile->line_vector->item[0];
961 | return off1 < off2;
962 | };
> Perhaps use std::stable_sort instead of doing it this way? (Unless I misunderstood the purpose of th [â¦]
Thanks, std::stable_sort does indeed solve the problem for me. I've updated the patch to make use of that instead.
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Ia0309494be4cfd9dcc554f30209477f5f040b21b
Gerrit-Change-Number: 526
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-CC: Christian Biesinger <cbiesinger@google.com>
Gerrit-Comment-Date: Fri, 08 Nov 2019 15:04:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Christian Biesinger <cbiesinger@google.com>
Gerrit-MessageType: comment
next prev parent reply other threads:[~2019-11-08 15:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 0:23 [review] " Andrew Burgess (Code Review)
2019-11-08 0:28 ` Christian Biesinger (Code Review)
2019-11-08 11:14 ` Andrew Burgess (Code Review)
2019-11-08 15:03 ` [review v2] " Andrew Burgess (Code Review)
2019-11-08 15:04 ` Andrew Burgess (Code Review) [this message]
2019-11-12 12:38 ` [review v3] " Andrew Burgess (Code Review)
2019-11-28 0:47 ` [review v4] " Andrew Burgess (Code Review)
2019-12-23 1:51 ` Andrew Burgess (Code Review)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191108150410.3763225B28@gnutoolchain-gerrit.osci.io \
--to=gerrit@gnutoolchain-gerrit.osci.io \
--cc=cbiesinger@google.com \
--cc=gdb-patches@sourceware.org \
--cc=gnutoolchain-gerrit@osci.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).