[0/5] Make line tables independent of objfile

Message ID 20230308-submit-constify-linetable-v1-0-ca4057478141@tromey.com
Headers
Series Make line tables independent of objfile |

Message

Tom Tromey March 8, 2023, 3:42 p.m. UTC
  This is a tiny step toward the long-term goal of "objfile splitting"
-- that is, making symbol tables independent of the objfile.  This
goal, if ever achieved, would allow for sharing of symbols and symbol
tables across inferiors.

The main issue in this splitting is to ensure that runtime offsets
aren't part of symbols.  This series applies this change to line
tables.

Regression tested on x86-64 Fedora 36.

Tom

---
Tom Tromey (5):
      Add operator< and operator== to linetable_entry
      Change linetables to be objfile-independent
      Constify linetables
      Remove extra scopes from objfile_relocate1
      Change linetable_entry::is_stmt to bool

 gdb/buildsym.c            |  30 +++++--------
 gdb/coffread.c            |   1 -
 gdb/dbxread.c             |   9 ++--
 gdb/disasm.c              |  31 +++++++++-----
 gdb/dwarf2/read.c         |   5 +--
 gdb/jit.c                 |  12 +++---
 gdb/linespec.c            |   6 +--
 gdb/mdebugread.c          |  14 ++++---
 gdb/mi/mi-symbol-cmds.c   |   6 ++-
 gdb/objfiles.c            |  92 +++++++++++++++-------------------------
 gdb/python/py-linetable.c |  14 +++----
 gdb/record-btrace.c       |  12 ++++--
 gdb/symmisc.c             |  10 ++---
 gdb/symtab.c              | 104 ++++++++++++++++++++++++++++------------------
 gdb/symtab.h              |  36 +++++++++++++---
 gdb/xcoffread.c           |  19 ++++-----
 16 files changed, 215 insertions(+), 186 deletions(-)
---
base-commit: 447d06696999be437b0e3c1a1f26e050ad91b952
change-id: 20230308-submit-constify-linetable-fb1ad2a5b673

Best regards,
  

Comments

Simon Marchi March 11, 2023, 3:51 a.m. UTC | #1
On 3/8/23 10:42, Tom Tromey wrote:
> This is a tiny step toward the long-term goal of "objfile splitting"
> -- that is, making symbol tables independent of the objfile.  This
> goal, if ever achieved, would allow for sharing of symbols and symbol
> tables across inferiors.
> 
> The main issue in this splitting is to ensure that runtime offsets
> aren't part of symbols.  This series applies this change to line
> tables.
> 
> Regression tested on x86-64 Fedora 36.
> 
> Tom

I sent minor comments on patch 2, but otherwise:

Approved-By: Simon Marchi <simon.marchi@efficios.com>

Simon