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

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).