~ubuntu-support-team/binutils/+git/binutils-gdb:users/jv/wip/feature-py-jit-api

Last commit made on 2023-04-21
Get this branch:
git clone -b users/jv/wip/feature-py-jit-api https://git.launchpad.net/~ubuntu-support-team/binutils/+git/binutils-gdb

Branch merges

Branch information

Name:
users/jv/wip/feature-py-jit-api
Repository:
lp:~ubuntu-support-team/binutils/+git/binutils-gdb

Recent commits

fe9dd76... by Jan Vrany <email address hidden>

gdb/python: add py-jit.exp

d25a69a... by Jan Vrany <email address hidden>

gdb/python: add gdb.Symtab.set_linetable ()

TODO:
 - tests
 - document

2f84914... by Jan Vrany <email address hidden>

gdb/python: allow to instantiate gdb.LineTableEntry objects

This commit allows users to instantiate gdb.LineTableEntry objects. This
feature will be used later to allow Python code to build and set a symtab
linetable.

39fa230... by Jan Vrany <email address hidden>

gdb/python: change internal representation of linetable entry object

a67e5c0... by Jan Vrany <email address hidden>

gdb/python: add gdb.Symtab.add_block ()

TODO:
 - add documentation
 - more tests

41aa565... by Jan Vrany <email address hidden>

gdb/python: add Python API to create a new symtab for dynamic objfile

TODO:
  - add documentation
  - more tests

b80fb83... by Jan Vrany <email address hidden>

gdb: use std::vector<> to hold on blocks in struct blockvector

This commit changes internal implementation of struct blockvector to use
std::vector<> rather than flexible array.

The main motivation for this change is to simplify adding blocks to
existing symtab. This feature will be used later by Python API to build
objfiles and symtabs dynamically (similarly to JIT reader API).

To do so, this commit

 1. introduces obstack_allocator, an implementation of Allocator
    concept that allocates memory on obstack.
 2. uses std::vector<> with the above allocator to hold on blocks
 3. updates users.

As a side-effect of this change, blockvectors allocated in mdebugread.c
are obstack-allocated rather than xzalloc()ated which seems to be the
correct thing to do. Also, code got simpler.

The downside might be higher memory consumption. The memory overhead
of std::vector should be small enough not to be of a concern. More
concerning is fact then one may leak obstack memory when excessively
adding blocks. However, blockvectors are not added blocks after initial
allocation at the moment (except in mdebugread.c) so this is not a
problem for existing code.

f139851... by Jan Vrany <email address hidden>

gdb/python: remove Python-created dynamic objfiles upon inferior exit

cddc37e... by Jan Vrany <email address hidden>

gdb/python: add is_dynamic attribute to Objfile Python object

d687163... by Jan Vrany <email address hidden>

gdb/python: allow creation of (dynamic) objfiles in Python