What is the bug :
    For bit field structure (see example if you
    don't see what I mean),
    gdb 4.18 is able to show the structure values
    but it is not able to modify correctly the
    structure
    [ it seems to use the right number of bits
      but not the right offset in the structure ]

        I have extracted this 'bug example' from
  my project :

C source :
----------

struct x86_gate {

  unsigned int offset_low:16, /* offset 0..15 */

  selector:16,

  word_count:8,

  access:8,

  offset_high:16; /* offset 16..31 */

};

struct x86_gate idt0 ;


GDB session :
-------------

(gdb) print /x idt0

$1 = {

  offset_low = 0x0,

  selector = 0x78,

  word_count = 0x0,

  access = 0x85,

  offset_high = 0x0

}

(gdb) set idt0.access = 0xe5


(gdb) print /x idt0

$2 = {

  offset_low = 0xe5,        <<<<<<<<<  HERE !!! >>>>>>>>>>>      

  selector = 0x78,

  word_count = 0x0,

  access = 0x85,

  offset_high = 0x0

}

System Information
------------------

Linux Distribution Red Hat 6.0 on i586
Build from sources :
  . GNU gcc 2.95.2
  . GNU gdb 4.18

      Please, may you notify me if a patch exists ? Thanks

 Regards.

-- Yves Martin --- Elève-ingénieur ENSIMAG - 3e année ---
  Adr : R.H.B. Ch. 765     [EMAIL PROTECTED]   
  2 av. J. O.  GRENOBLE      Tél: 04 76 44 20 01         
---------------------------- ICQ: 53379907 --------------

Reply via email to