Tomer
Tomer

Reputation: 1229

Debugging xv6 kernel with gdb - Selected architecture i386 is not compatible with reported target architecture

I'm running on Ubuntu 20.04 host and try to remote debug xv6 kernel running locally under qemu emulator.

I run :

  1. gdb kernel
  2. target remote localhost:26000

I get :

Remote debugging using localhost:26000 warning: Selected architecture i386 is not compatible with reported target architecture i386:x86-64 warning: Architecture rejected target-supplied description Remote 'g' packet reply is too long (expected 312 bytes, got 608 bytes): 0000000000000000000000000000000000000000000000006306000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f0ff0000000000000200000000f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f0300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000 (gdb)

Any idea how can I solve this problem ?

Thanks!

Gil

Upvotes: 0

Views: 1324

Answers (1)

Sina Kamalii
Sina Kamalii

Reputation: 46

Use the following command in gdb:

(gdb) set architecture i386:x86-64

This solved it for me.

Upvotes: 2

Related Questions