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 gdb/22979] New: gdb configured with target=x86_64-elf ends up with i386 machine description


https://sourceware.org/bugzilla/show_bug.cgi?id=22979

            Bug ID: 22979
           Summary: gdb configured with target=x86_64-elf ends up with
                    i386 machine description
           Product: gdb
           Version: 8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: doug16k at gmail dot com
  Target Milestone: ---

Repro: 

1) Build and install gdb with --target=x86_64-elf
2) Run x86_64-elf-gdb
3) Run command: maintenance print raw-registers

This is the output:

(gdb) maintenance print raw-registers 
 Name         Nr  Rel Offset    Size  Type            Raw value
 eax           0    0      0       4 int32_t         <invalid>
 ecx           1    1      4       4 int32_t         <invalid>
 edx           2    2      8       4 int32_t         <invalid>
 ebx           3    3     12       4 int32_t         <invalid>
 esp           4    4     16       4 *1              <invalid>
 ebp           5    5     20       4 *1              <invalid>
 esi           6    6     24       4 int32_t         <invalid>
 edi           7    7     28       4 int32_t         <invalid>
 eip           8    8     32       4 *1              <invalid>
 eflags        9    9     36       4 i386_eflags     <invalid>
 cs           10   10     40       4 int32_t         <invalid>
 ss           11   11     44       4 int32_t         <invalid>
 ds           12   12     48       4 int32_t         <invalid>
 es           13   13     52       4 int32_t         <invalid>
 fs           14   14     56       4 int32_t         <invalid>
 gs           15   15     60       4 int32_t         <invalid>
 st0          16   16     64      10 _i387_ext       <invalid>
 st1          17   17     74      10 _i387_ext       <invalid>
 st2          18   18     84      10 _i387_ext       <invalid>
 st3          19   19     94      10 _i387_ext       <invalid>
 st4          20   20    104      10 _i387_ext       <invalid>
 st5          21   21    114      10 _i387_ext       <invalid>
 st6          22   22    124      10 _i387_ext       <invalid>
 st7          23   23    134      10 _i387_ext       <invalid>
 fctrl        24   24    144       4 long            <invalid>
 fstat        25   25    148       4 long            <invalid>
 ftag         26   26    152       4 long            <invalid>
 fiseg        27   27    156       4 long            <invalid>
 fioff        28   28    160       4 long            <invalid>
 foseg        29   29    164       4 long            <invalid>
 fooff        30   30    168       4 long            <invalid>
 fop          31   31    172       4 long            <invalid>
 xmm0         32   32    176      16 vec128          <invalid>
 xmm1         33   33    192      16 vec128          <invalid>
 xmm2         34   34    208      16 vec128          <invalid>
 xmm3         35   35    224      16 vec128          <invalid>
 xmm4         36   36    240      16 vec128          <invalid>
 xmm5         37   37    256      16 vec128          <invalid>
 xmm6         38   38    272      16 vec128          <invalid>
 xmm7         39   39    288      16 vec128          <invalid>
 mxcsr        40   40    304       4 i386_mxcsr      <invalid>
 ''           41   41    308       0 int0_t          <invalid>
 ''           42   42    308       0 int0_t          <invalid>
 ''           43   43    308       0 int0_t          <invalid>
 ''           44   44    308       0 int0_t          <invalid>
 ''           45   45    308       0 int0_t          <invalid>
 ''           46   46    308       0 int0_t          <invalid>
 ''           47   47    308       0 int0_t          <invalid>
 ''           48   48    308       0 int0_t          <invalid>
 ''           49   49    308       0 int0_t          <invalid>
 ''           50   50    308       0 int0_t          <invalid>
 ''           51   51    308       0 int0_t          <invalid>
 ''           52   52    308       0 int0_t          <invalid>
 ''           53   53    308       0 int0_t          <invalid>
 ''           54   54    308       0 int0_t          <invalid>
 ''           55   55    308       0 int0_t          <invalid>
 ''           56   56    308       0 int0_t          <invalid>
 ''           57   57    308       0 int0_t          <invalid>
 ''           58   58    308       0 int0_t          <invalid>
 ''           59   59    308       0 int0_t          <invalid>
 ''           60   60    308       0 int0_t          <invalid>
 ''           61   61    308       0 int0_t          <invalid>
 ''           62   62    308       0 int0_t          <invalid>
 ''           63   63    308       0 int0_t          <invalid>
 ''           64   64    308       0 int0_t          <invalid>
 ''           65   65    308       0 int0_t          <invalid>
 ''           66   66    308       0 int0_t          <invalid>
 ''           67   67    308       0 int0_t          <invalid>
 ''           68   68    308       0 int0_t          <invalid>
 ''           69   69    308       0 int0_t          <invalid>
 ''           70   70    308       0 int0_t          <invalid>
 ''           71   71    308       0 int0_t          <invalid>
 al           72    0    308       1 int8_t          <cooked>
 cl           73    1    309       1 int8_t          <cooked>
 dl           74    2    310       1 int8_t          <cooked>
 bl           75    3    311       1 int8_t          <cooked>
 ah           76    4    312       1 int8_t          <cooked>
 ch           77    5    313       1 int8_t          <cooked>
 dh           78    6    314       1 int8_t          <cooked>
 bh           79    7    315       1 int8_t          <cooked>
 ax           80    8    316       2 int16_t         <cooked>
 cx           81    9    318       2 int16_t         <cooked>
 dx           82   10    320       2 int16_t         <cooked>
 bx           83   11    322       2 int16_t         <cooked>
 ''           84   12    324       2 int16_t         <cooked>
 bp           85   13    326       2 int16_t         <cooked>
 si           86   14    328       2 int16_t         <cooked>
 di           87   15    330       2 int16_t         <cooked>
 mm0          88   16    332       8 _vec64i         <cooked>
 mm1          89   17    340       8 _vec64i         <cooked>
 mm2          90   18    348       8 _vec64i         <cooked>
 mm3          91   19    356       8 _vec64i         <cooked>
 mm4          92   20    364       8 _vec64i         <cooked>
 mm5          93   21    372       8 _vec64i         <cooked>
 mm6          94   22    380       8 _vec64i         <cooked>
 mm7          95   23    388       8 _vec64i         <cooked>
*1: Register type's name NULL.
(gdb) 

It will not accept a machine description for x86_64 from a gdb stub (which is
accepted by and works with x86_64-linux-gnu). Shows this message:

(gdb) set debug arch 1
(gdb) target remote localhost:7788
Remote debugging using localhost:7788
gdbarch_find_by_info: info.bfd_arch_info i386:x86-64
gdbarch_find_by_info: info.byte_order 1 (little)
gdbarch_find_by_info: info.osabi 0 (none)
gdbarch_find_by_info: info.abfd 0x5622dcd7a950
gdbarch_find_by_info: info.tdep_info 0x0
gdbarch_find_by_info: Target rejected architecture
gdbarch_update_p: Architecture not found
warning: Architecture rejected target-supplied description
Remote 'g' packet reply is too long (expected 308 bytes, got 2408 bytes):
0000...[snip]

308 is nonsense for x86_64 context.

-- 
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]