Hi, I found out that GDB is not currently disassembling instructions which are available on power4, power5 or power6 processors even though it has support to do so. GDB copies the disassembler code from binutils, which provides a -M option to let the user specify the dialect to be used, but the problem is that GDB itself doesn't provide a command or option to let the user specify the dialect. The result is that the powerpc_dialect() function in ppc-dis.c will always return the same value, which doesn't include any of the PPC_OPCODE_POWER[456] flags. Example: (gdb) disassemble main Dump of assembler code for function main: 0x1000046c : stwu r1,-48(r1) 0x10000470 : stw r31,44(r1) 0x10000474 : mr r31,r1 0x10000478 : stw r3,24(r31) 0x1000047c : stw r4,28(r31) 0x10000480 : li r0,4 0x10000484 : stw r0,8(r31) 0x10000488 : .long 0x7c284fec 0x1000048c : .long 0xed405834 0x10000490 : lwz r11,0(r1) 0x10000494 : lwz r31,-4(r11) 0x10000498 : mr r1,r11 0x1000049c : blr End of assembler dump. (gdb) In the output above, ".long 0x7c284fec" is an instruction available only in power4 or later processors (dcbzl), and ".long 0xed405834" is available only in power5 or later (frsqrtes). The attached patch makes GDB always use the -Many option of the disassembler, which will make it disassemble every instruction it understands. Here's the output with the patch applied: (gdb) disassemble main Dump of assembler code for function main: 0x1000046c : stwu r1,-48(r1) 0x10000470 : stw r31,44(r1) 0x10000474 : mr r31,r1 0x10000478 : stw r3,24(r31) 0x1000047c : stw r4,28(r31) 0x10000480 : li r0,4 0x10000484 : stw r0,8(r31) 0x10000488 : dcbzl r8,r9 0x1000048c : frsqrtes f10,f11 0x10000490 : lwz r11,0(r1) 0x10000494 : lwz r31,-4(r11) 0x10000498 : mr r1,r11 0x1000049c : blr End of assembler dump. (gdb) Comments? Can this patch be applied? -- []'s Thiago Jung Bauermann Software Engineer IBM Linux Technology Center