public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] [gdb] untie and validate inheritance location
@ 2021-09-30 19:26 Bruno Larsen
  2021-09-30 19:26 ` [PATCH v3 1/2] [gdb] Untied inheritance virtuality and loc kind Bruno Larsen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Bruno Larsen @ 2021-09-30 19:26 UTC (permalink / raw)
  To: gdb-patches; +Cc: simon.marchi, blarsen

This started with what was thought of as an incorrect inheritance
location expression, but turned out to be a correct, but unusual
expression, and uncovered an incorrect assumption when calculating
offsets of baseclasses. 

This patchset is the new iteration of that solution, that changed
gnuv3_baseclass_offset calculation to allow for non-virtual inheritance
that has a non-trivial location expression and also moved the basic
validation to this function. The check in value_contents_copy_raw was
changed to an assert.
Finally, the test was expanded to have one incorrect trivial location,
and two non-trivial location expressions, one correct and one incorrect.

Bruno Larsen (2):
  [gdb] Untied inheritance virtuality and loc kind
  [gdb] Add Simple offset validation when calculating baseclass_offset

 gdb/gnu-v3-abi.c                              |  23 +-
 .../gdb.dwarf2/dw2-inheritance-locexpr-1.exp  | 233 +++++++++++++++++
 .../gdb.dwarf2/dw2-inheritance-locexpr-2.exp  | 235 ++++++++++++++++++
 .../gdb.dwarf2/dw2-inheritance-locexpr.c      |  69 +++++
 gdb/value.c                                   |   8 +-
 5 files changed, 561 insertions(+), 7 deletions(-)
 create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-inheritance-locexpr-1.exp
 create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-inheritance-locexpr-2.exp
 create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-inheritance-locexpr.c

-- 
2.27.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-08 21:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 19:26 [PATCH v3 0/2] [gdb] untie and validate inheritance location Bruno Larsen
2021-09-30 19:26 ` [PATCH v3 1/2] [gdb] Untied inheritance virtuality and loc kind Bruno Larsen
2021-09-30 19:26 ` [PATCH v3 2/2] [gdb] Add Simple offset validation when calculating baseclass_offset Bruno Larsen
2021-09-30 19:36   ` [PATCH v3 2/2 RESEND] " Bruno Larsen
2021-10-19 19:15 ` [PING][PATCH v3 0/2] [gdb] untie and validate inheritance location Bruno Larsen
2021-11-01 13:17   ` [PING*2][PATCH " Bruno Larsen
2021-11-08 18:33     ` [PING*3][PATCH " Bruno Larsen
2021-11-08 21:16       ` Simon Marchi

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).