public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug varobj/25470] Assertion hit in maybe_negate_by_bytes
[not found] <bug-25470-4717@http.sourceware.org/bugzilla/>
@ 2020-08-09 21:11 ` tromey at sourceware dot org
2020-08-14 7:22 ` tromey at sourceware dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2020-08-09 21:11 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=25470
--- Comment #9 from Tom Tromey <tromey at sourceware dot org> ---
What is the DWARF emitted for one of these non-zero but non-byte-sized
types?
It ought to have a byte size (the storage size), a bit size, and optionally
a bit offset.
Removing the assert from maybe_negate_by_bytes and replacing it with
/* 0-length integer types are possible in Zig, at least. */
if (len == 0)
return false;
... at least makes symbol reading not crash.
I'd have to write a test case to see if it really works though.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug varobj/25470] Assertion hit in maybe_negate_by_bytes
[not found] <bug-25470-4717@http.sourceware.org/bugzilla/>
2020-08-09 21:11 ` [Bug varobj/25470] Assertion hit in maybe_negate_by_bytes tromey at sourceware dot org
@ 2020-08-14 7:22 ` tromey at sourceware dot org
2020-08-17 1:54 ` [Bug symtab/25470] " tromey at sourceware dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2020-08-14 7:22 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=25470
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-08-14
Assignee|unassigned at sourceware dot org |tromey at sourceware dot org
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #10 from Tom Tromey <tromey at sourceware dot org> ---
I have a patch for most of this.
I think assignment still doesn't work.
And, I am not sure it will work on big-endian machines as-is;
I never remember the rule for bit-numbering on big-endian.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/25470] Assertion hit in maybe_negate_by_bytes
[not found] <bug-25470-4717@http.sourceware.org/bugzilla/>
2020-08-09 21:11 ` [Bug varobj/25470] Assertion hit in maybe_negate_by_bytes tromey at sourceware dot org
2020-08-14 7:22 ` tromey at sourceware dot org
@ 2020-08-17 1:54 ` tromey at sourceware dot org
2020-08-17 2:11 ` tromey at sourceware dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2020-08-17 1:54 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=25470
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|varobj |symtab
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/25470] Assertion hit in maybe_negate_by_bytes
[not found] <bug-25470-4717@http.sourceware.org/bugzilla/>
` (2 preceding siblings ...)
2020-08-17 1:54 ` [Bug symtab/25470] " tromey at sourceware dot org
@ 2020-08-17 2:11 ` tromey at sourceware dot org
2020-09-23 15:51 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2020-08-17 2:11 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=25470
--- Comment #11 from Tom Tromey <tromey at sourceware dot org> ---
https://sourceware.org/pipermail/gdb-patches/2020-August/171309.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/25470] Assertion hit in maybe_negate_by_bytes
[not found] <bug-25470-4717@http.sourceware.org/bugzilla/>
` (3 preceding siblings ...)
2020-08-17 2:11 ` tromey at sourceware dot org
@ 2020-09-23 15:51 ` cvs-commit at gcc dot gnu.org
2020-09-23 15:52 ` tromey at sourceware dot org
2020-10-08 17:54 ` tromey at sourceware dot org
6 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-23 15:51 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=25470
--- Comment #12 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=20a5fcbd5b28cca88511ac5a9ad5e54251e8fa6d
commit 20a5fcbd5b28cca88511ac5a9ad5e54251e8fa6d
Author: Tom Tromey <tom@tromey.com>
Date: Wed Sep 23 09:39:24 2020 -0600
Handle bit offset and bit size in base types
PR symtab/25470 points out that the Zig programming language allows
integers of various bit sizes (including zero), not just sizes that
are a multiple of 8.
This is supported in DWARF by applying both a byte size and a
DW_AT_bit_size.
This patch adds support for this feature to integer and boolean types.
Other base types are not handled -- for floating-point types, this
didn't seem to make sense, and for character types I didn't see much
need. (These can be added later if desired.)
I've also added support for DW_AT_data_bit_offset at the same time. I
don't know whether the Zig compiler requires this, but it was
described in the same section in the DWARF standard and was easy to
add.
A new test case is supplied, using the DWARF assembler.
gdb/ChangeLog
2020-09-23 Tom Tromey <tom@tromey.com>
PR symtab/25470:
* value.c (unpack_long, pack_long, pack_unsigned_long): Handle bit
offset and bit size.
* printcmd.c (print_scalar_formatted): Handle zero-length
integer.
(print_scalar_formatted): Use bit_size_differs_p.
* gdbtypes.h (enum type_specific_kind) <TYPE_SPECIFIC_INT>: New
constant.
(union type_specific): <int_stuff>: New member.
(struct type) <bit_size_differs_p, bit_size, bit_offset>: New
methods.
* gdbtypes.c (init_integer_type, init_boolean_type): Initialize
TYPE_SPECIFIC_FIELD.
(recursive_dump_type, copy_type_recursive): Update.
* dwarf2/read.c (read_base_type): Handle DW_AT_bit_size and
DW_AT_data_bit_offset.
gdb/testsuite/ChangeLog
2020-09-23 Tom Tromey <tom@tromey.com>
* gdb.dwarf2/intbits.exp: New file.
* gdb.dwarf2/intbits.c: New file.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/25470] Assertion hit in maybe_negate_by_bytes
[not found] <bug-25470-4717@http.sourceware.org/bugzilla/>
` (4 preceding siblings ...)
2020-09-23 15:51 ` cvs-commit at gcc dot gnu.org
@ 2020-09-23 15:52 ` tromey at sourceware dot org
2020-10-08 17:54 ` tromey at sourceware dot org
6 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2020-09-23 15:52 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=25470
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #13 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.
It'll be in gdb 11 but that isn't available as a target milestone
in bugzilla yet.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/25470] Assertion hit in maybe_negate_by_bytes
[not found] <bug-25470-4717@http.sourceware.org/bugzilla/>
` (5 preceding siblings ...)
2020-09-23 15:52 ` tromey at sourceware dot org
@ 2020-10-08 17:54 ` tromey at sourceware dot org
6 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2020-10-08 17:54 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=25470
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.1
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-10-08 17:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-25470-4717@http.sourceware.org/bugzilla/>
2020-08-09 21:11 ` [Bug varobj/25470] Assertion hit in maybe_negate_by_bytes tromey at sourceware dot org
2020-08-14 7:22 ` tromey at sourceware dot org
2020-08-17 1:54 ` [Bug symtab/25470] " tromey at sourceware dot org
2020-08-17 2:11 ` tromey at sourceware dot org
2020-09-23 15:51 ` cvs-commit at gcc dot gnu.org
2020-09-23 15:52 ` tromey at sourceware dot org
2020-10-08 17:54 ` tromey at sourceware dot org
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).