Can you display readable RTX from within gdb?

Tom Womack tom@womack.net
Mon Mar 18 00:55:00 GMT 2002


I'm sure I've seen some instructions about getting more context for ICEs by
using gdb on the c++ executables, but they don't appear to be in
info:/gccint.

Chasing down my just-reported bug, I find

stack_def* regstack;
rtx_def** src;
rtx_def* pat;

What commands do I have to use in gdb (presumably calling functions in
cc1plus) to display the RTL in a human-readable format?

print GET_CODE(pat)

fails because GET_CODE is a macro and not available at this level of
abstraction; similarly XEXP and other macros seen in the source of
reg-stack.c.

print pat[0]

gives reasonable pleasant output, with enums displayed by name rather than
by number, but I still can't follow in the slightest what's going on. Have
you any advice?

Tom



More information about the Gcc mailing list