public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/30345] New: GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables.
@ 2023-04-13 12:07 hluaw at connect dot ust.hk
2023-04-13 12:21 ` [Bug gdb/30345] " tromey at sourceware dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: hluaw at connect dot ust.hk @ 2023-04-13 12:07 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30345
Bug ID: 30345
Summary: GDB shows "That operation is not available on integers
of more than 8 bytes." when printing regular
variables.
Product: gdb
Version: 13.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: hluaw at connect dot ust.hk
Target Milestone: ---
Given the following code:
#pragma pack(1)
struct {
unsigned : 6;
signed : 8;
signed : 27;
signed : 6;
unsigned b : 14;
signed : 4;
} c, d;
int d_1, e, f, k, aa, l, af, ag, ah, h, iab, i_5;
long m;
int main() {
int l_212;
int *r[42] = {&e, &l_212, &f, &e, &f, &f, &l_212, &e, &f, &l_212, &f};
l_212 = (m = (d.b |= 0) | 0);
}
Compiled with Clang 15.0.7 with -O1 -g.
l_212 is then with the following DWARF information:
Range 0x55555555461d-0x555555554628: a complex DWARF expression:
0: DW_OP_breg0 0 [$rax]
2: DW_OP_constu 4294967295
8: DW_OP_and
9: DW_OP_convert<DW_ATE_unsigned_72 [0x27]>
14: DW_OP_convert<DW_ATE_unsigned_32 [0x2b]>
19: DW_OP_stack_value
[4-byte piece]
.
Break at 0x55555555461d where this DWARF expression takes effect:
(gdb) b *0x55555555461d
Breakpoint 1 at 0x55555555461d
(gdb) r
Starting program: /home/hluaw/debugger-bugs/unavail_op/a.out
Breakpoint 1, 0x000055555555461d in main () at r.c:16
16 l_212 = (m = (d.b |= 0) | 0);
(gdb) p l_212
That operation is not available on integers of more than 8 bytes.
To my understanding, this error message should only appear when using something
like print ((int128_t)1) << 64
It seems not right to yield this error when evaluating a normal variable.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug gdb/30345] GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables.
2023-04-13 12:07 [Bug gdb/30345] New: GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables hluaw at connect dot ust.hk
@ 2023-04-13 12:21 ` tromey at sourceware dot org
2023-04-13 12:38 ` hluaw at connect dot ust.hk
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2023-04-13 12:21 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30345
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |26909
CC| |tromey at sourceware dot org
--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
This sequence:
9: DW_OP_convert<DW_ATE_unsigned_72 [0x27]>
14: DW_OP_convert<DW_ATE_unsigned_32 [0x2b]>
...probably is the problem, and is also somewhat pointless.
Arguably perhaps the GMP support should be extended into DWARF
expressions, but at the same time, doing it just to support
this kind of thing seems like a lot of work for little benefit.
Referenced Bugs:
https://sourceware.org/bugzilla/show_bug.cgi?id=26909
[Bug 26909] [meta] Debug Clang-built code
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug gdb/30345] GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables.
2023-04-13 12:07 [Bug gdb/30345] New: GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables hluaw at connect dot ust.hk
2023-04-13 12:21 ` [Bug gdb/30345] " tromey at sourceware dot org
@ 2023-04-13 12:38 ` hluaw at connect dot ust.hk
2023-04-13 14:42 ` tromey at sourceware dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hluaw at connect dot ust.hk @ 2023-04-13 12:38 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30345
--- Comment #2 from LU Hongyi <hluaw at connect dot ust.hk> ---
(In reply to Tom Tromey from comment #1)
> This sequence:
> 9: DW_OP_convert<DW_ATE_unsigned_72 [0x27]>
> 14: DW_OP_convert<DW_ATE_unsigned_32 [0x2b]>
>
> ...probably is the problem, and is also somewhat pointless.
> Arguably perhaps the GMP support should be extended into DWARF
> expressions, but at the same time, doing it just to support
> this kind of thing seems like a lot of work for little benefit.
GDB seems to have a loose support for DW_OP_convert?
Another bug #30319 I found also relates to this operator, which reports Type
Incompatible when it (actually?) compatible.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug gdb/30345] GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables.
2023-04-13 12:07 [Bug gdb/30345] New: GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables hluaw at connect dot ust.hk
2023-04-13 12:21 ` [Bug gdb/30345] " tromey at sourceware dot org
2023-04-13 12:38 ` hluaw at connect dot ust.hk
@ 2023-04-13 14:42 ` tromey at sourceware dot org
2023-04-13 14:50 ` tromey at sourceware dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2023-04-13 14:42 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30345
--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to LU Hongyi from comment #2)
> GDB seems to have a loose support for DW_OP_convert?
It's more that gdb supports 64 bit types in DWARF expressions,
but nothing wider. This is done primarily because, until
this bug report, nobody ever saw a wider type in a DWARF
expression.
> Another bug #30319 I found also relates to this operator, which reports Type
> Incompatible when it (actually?) compatible.
I've commented on that one now.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug gdb/30345] GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables.
2023-04-13 12:07 [Bug gdb/30345] New: GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables hluaw at connect dot ust.hk
` (2 preceding siblings ...)
2023-04-13 14:42 ` tromey at sourceware dot org
@ 2023-04-13 14:50 ` tromey at sourceware dot org
2023-04-13 15:01 ` hluaw at connect dot ust.hk
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2023-04-13 14:50 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30345
--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
Ah, I forgot that when implementing DW_OP_convert,
we converted the DWARF expression evaluator to be value-based.
With that and the work to make 128-bit values work,
I think this may be fixed on git master.
I can't try it though as my clang emits different DWARF:
0: DW_OP_breg0 0 [$rax]
2: DW_OP_constu 4294967295
8: DW_OP_and
9: DW_OP_stack_value
10: DW_OP_piece 4 (bytes)
Anyway this is probably a dup of bug# 30190.
Could you try your example with git master gdb?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug gdb/30345] GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables.
2023-04-13 12:07 [Bug gdb/30345] New: GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables hluaw at connect dot ust.hk
` (3 preceding siblings ...)
2023-04-13 14:50 ` tromey at sourceware dot org
@ 2023-04-13 15:01 ` hluaw at connect dot ust.hk
2023-04-13 17:10 ` tromey at sourceware dot org
2025-01-08 15:41 ` ssbssa at sourceware dot org
6 siblings, 0 replies; 8+ messages in thread
From: hluaw at connect dot ust.hk @ 2023-04-13 15:01 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30345
LU Hongyi <hluaw at connect dot ust.hk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #5 from LU Hongyi <hluaw at connect dot ust.hk> ---
I tried master gdb, it works now.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug gdb/30345] GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables.
2023-04-13 12:07 [Bug gdb/30345] New: GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables hluaw at connect dot ust.hk
` (4 preceding siblings ...)
2023-04-13 15:01 ` hluaw at connect dot ust.hk
@ 2023-04-13 17:10 ` tromey at sourceware dot org
2025-01-08 15:41 ` ssbssa at sourceware dot org
6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2023-04-13 17:10 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30345
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.1
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug gdb/30345] GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables.
2023-04-13 12:07 [Bug gdb/30345] New: GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables hluaw at connect dot ust.hk
` (5 preceding siblings ...)
2023-04-13 17:10 ` tromey at sourceware dot org
@ 2025-01-08 15:41 ` ssbssa at sourceware dot org
6 siblings, 0 replies; 8+ messages in thread
From: ssbssa at sourceware dot org @ 2025-01-08 15:41 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30345
Hannes Domani <ssbssa at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hyuzw233 at gmail dot com
--- Comment #6 from Hannes Domani <ssbssa at sourceware dot org> ---
*** Bug 32530 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-01-08 15:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-13 12:07 [Bug gdb/30345] New: GDB shows "That operation is not available on integers of more than 8 bytes." when printing regular variables hluaw at connect dot ust.hk
2023-04-13 12:21 ` [Bug gdb/30345] " tromey at sourceware dot org
2023-04-13 12:38 ` hluaw at connect dot ust.hk
2023-04-13 14:42 ` tromey at sourceware dot org
2023-04-13 14:50 ` tromey at sourceware dot org
2023-04-13 15:01 ` hluaw at connect dot ust.hk
2023-04-13 17:10 ` tromey at sourceware dot org
2025-01-08 15:41 ` ssbssa 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).