Showing results for 
Show  only  | Search instead for 
Did you mean:
Registered: ‎03-28-2008

strace for microblaze+MMU

I now have a 2.6.35 mainline Microblaze+MMU system running
on our custom Spartan 3a board.    I saw that Microblaze
patches were added recently for 'strace', so I tried
to build strace (using the latest strace snapshot).

When I build, I get a compile error that I traced back to
a conflict related to the definition of the symbol PT_PC.
I'm using the Xilinx toolchain called out here:

In the toolchain source, the file:
has this definition:
      PT_PC = 18,
    #define PT_PC PT_PC

But in the Microblaze linux source, the file:
has this definition:
    #define PT_PC           (32 * sizeof(microblaze_reg_t))

These two definitions collide when I am building
strace, specifically when building syscall.c in strace.

To work around this, I changed the asm/ptrace.h definition
of "PT_PC" and renamed it "PT_RPC", and I changed that
reference in strace/process.c.    When I did that, strace built
and ran on my platform.     (Interestingly, it segfaulted when
I tried to attach to a running PID, but it worked when I
ran an app under strace.)

Has anyone been trying to build and use strace in a similar
config?    I'd appreciate any pointers.


0 Kudos
0 Replies