forked from Imagelibrary/binutils-gdb
Avoid crash with GCC trunk
With GCC trunk, gdb.ada/access_to_packed_array.exp causes a GDB crash. The problem is that ptype tries to resolve a dynamic type. However, the inferior is not running, so there are no frames. This patch updates dwarf2_evaluate_loc_desc::get_frame_base to handle this situation. gdb/ChangeLog 2021-05-17 Tom Tromey <tromey@adacore.com> * dwarf2/loc.c (dwarf2_evaluate_loc_desc::get_frame_base): Throw if frame is null.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2021-05-17 Tom Tromey <tromey@adacore.com>
|
||||
|
||||
* dwarf2/loc.c (dwarf2_evaluate_loc_desc::get_frame_base): Throw
|
||||
if frame is null.
|
||||
|
||||
2021-05-17 Tom Tromey <tromey@adacore.com>
|
||||
|
||||
* nat/linux-osdata.c (user_from_uid, time_from_time_t)
|
||||
|
||||
@@ -785,6 +785,9 @@ public:
|
||||
its length in LENGTH. */
|
||||
void get_frame_base (const gdb_byte **start, size_t * length) override
|
||||
{
|
||||
if (frame == nullptr)
|
||||
error (_("frame address is not available."));
|
||||
|
||||
/* FIXME: cagney/2003-03-26: This code should be using
|
||||
get_frame_base_address(), and then implement a dwarf2 specific
|
||||
this_base method. */
|
||||
|
||||
Reference in New Issue
Block a user