This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug exp/12355] New: GDB takes address of a bit-field. It shouldnot.


http://sourceware.org/bugzilla/show_bug.cgi?id=12355

           Summary: GDB takes address of a bit-field.  It should not.
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: exp
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com


struct { unsigned b : 1; } v;
void *p = &v.b;
int main (void) { return 0; }

gcc (GCC) 4.6.0 20101227 (experimental)
1.c:2:1: error: cannot take address of bit-field âbâ

GNU gdb (GDB) 7.2.50.20101228-cvs
(gdb) p &v.b
$1 = (unsigned int *) 0x600818

This is confusing for watchpoints etc. if one does not expect a bit-field.

(starting point: value_addr())

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]