Sparc debug info patch

Please review the enclosed patch for Sparc debug info.
I have been able to view source files, set breakpoints, and single step source lines after applying this patch. I can't view variables because I haven't implemented Dwarf type data, yet.

-Rich

sparcdebug.patch (3.43 KB)

Cool! I'm glad to see progress on the sparc backend:

+++ lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp (working copy)
@@ -44,6 +44,8 @@

  namespace {
    class VISIBILITY_HIDDEN SparcAsmPrinter : public AsmPrinter {
+ DwarfWriter *DW;

Chris Lattner wrote:

Cool! I'm glad to see progress on the sparc backend:

+++ lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp (working copy)
@@ -44,6 +44,8 @@

namespace {
   class VISIBILITY_HIDDEN SparcAsmPrinter : public AsmPrinter {
+ DwarfWriter *DW;
+

This shouldn't be needed, the AsmPrinter base class now has this. This allows you to remove SparcAsmPrinter::doInitialization.

Otherwise, looks great, please apply.

Thanks Chris,

I'm in the process of syncing up with TOT, after which I'll test and apply the patch.

Just to keep you up to date about what I'm doing...

I'm trying to set up a code generator test bed, initially for all the targets supported by both LLVM and qemu.

I've put together a standard library consisting of newlib, soft-flt, and compiler-rt. Currently I'm targeting Linux, but I'm trying to isolate the OS specific bits so that eventually I'll be targeting other OSes and bare metal.

I can use qemu in Linux user mode to execute and debug programs for the x86, ARM, and Sparc so far. I have some code generation issues with powerpc and mips (e.g. http://llvm.org/bugs/show_bug.cgi?id=4851) but I think things are progressing fairly well.

I do have a question however: Which code generators currently fully support debug information? I know the x86 generator does, but ARM and Sparc seem to ignore local variable information. since I'm coming in with little familiarity with the LLVM debug info stuff, where should I look to come up to speed?

-Rich

I think that PPC and X86 are the only ones with full support so far,

-Chris