Summary: | GDB crash on _BitInt debuginfo | ||
---|---|---|---|
Product: | gdb | Reporter: | Jakub Jelinek <jakub> |
Component: | gdb | Assignee: | Tom Tromey <tromey> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | tromey |
Priority: | P2 | ||
Version: | 12.1 | ||
Target Milestone: | 14.1 | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: |
bitint-39a.s
bitint-39a.c |
Description
Jakub Jelinek
2023-07-18 17:33:20 UTC
Created attachment 14985 [details]
bitint-39a.c
I have a fix, just have to write a test case. There should probably be a separate bug for implementing this stuff in gdb's parser / expression evaluator. Yeah. I've filed https://dwarfstd.org/issues/230529.1.html proposal for DWARF6, but it hasn't been discussed yet. And, while GDB can print some _BitInt values just fine (seems if they are multiple of 64 bits, it gives up on others. Right now when debugging stuff I'm just printing the limbs using x/<N>gx &var when GDB can't handle it. (In reply to Jakub Jelinek from comment #4) > Yeah. I've filed https://dwarfstd.org/issues/230529.1.html proposal for > DWARF6, but it hasn't been discussed yet. And, while GDB can print some > _BitInt values just fine (seems if they are multiple of 64 bits, it gives up > on others. Right now when debugging stuff I'm just printing the limbs using > x/<N>gx &var when GDB can't handle it. It looks like there are new suffixes too? And the semantics of these aren't identical to existing int types? And I guess new ABI... probably will end up wanting several gdb bugs to implement it all. The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4d051f3a4e2839225f7de0ea783e2fdca1c7717e commit 4d051f3a4e2839225f7de0ea783e2fdca1c7717e Author: Tom Tromey <tom@tromey.com> Date: Thu Jul 20 15:48:46 2023 -0600 Fix crash with DW_FORM_implicit_const Jakub pointed out that using DW_FORM_implicit_const with DW_AT_bit_size would cause gdb to crash. This happened because DW_FORM_implicit_const is not an "unsigned" form, causing as_unsigned to assert. This patch fixes the problem. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30651 Approved-By: Andrew Burgess <aburgess@redhat.com> Fixed. |