From christophe.lyon  Mon Oct 17 08:16:19 2005
From: christophe.lyon (Christophe LYON)
Date: Mon Oct 17 08:16:19 2005
Subject: [Dwarf-discuss] debug_frame for optimized code
Message-ID: <4353BF71.4000005@st.com>


Hi all,

I am currently working on the debug_frame info emission in our C/C++ 
compiler (based on Open64).
I have recently come across optimized code which I don't know how to handle.

Consider the following function:

foo() {
	PROLOGUE

	if (COND1) {
		SAVE_REG r1 to stack
		compute
		bar1()
		RESTORE r1
	}
	else if (COND2) {
		bar2()
	}

	EPILOGUE
}

Suppose that the generated code looks like:
foo:
	PROLOGUE
	COND1
	if true goto LABEL1

	COND2
	if true goto LABEL2
	
epilogue_label:
	EPILOGUE

LABEL1:
	SAVE register r1 to stack
	compute....
	goto CALL_BAR1

LABEL2:
	CALL bar2
	goto epilogue_label

CALL_BAR1:
	CALL bar1
	RESTORE r1
	goto epilogue_label

So my question is:
what debug_frame info should I generate around LABEL1, LABEL2, and 
CALL_BAR1 ?
Should I repeat all the info of the prologue before LABEL1 and LABEL2?
for CALL_BAR1, should I also add the save of register r1 ?

It's also unclear to me if I can/should use the 
remember_state/restore_state dwarf operators.
Indeed, what is the rule?

Use remember_state after the prologue, and use restore state at LABEL1 
and LABEL2?
But as states are defined as a stack, it means I would restore twice the 
same thing...

Any help/suggestion highly appreciated!

Thanks,

Christophe.




From eager  Tue Oct 18 20:32:00 2005
From: eager (Michael Eager)
Date: Tue Oct 18 20:32:00 2005
Subject: [Dwarf-discuss] Important Notice
Message-ID: <43559D9D.2030408@eagercon.com>

Please update your mailing address for the Dwarf Discussion
list to mailto:Dwarf-discuss at freestandards.org.

-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



From eager  Tue Oct 18 21:33:21 2005
From: eager (Michael Eager)
Date: Tue Oct 18 21:33:21 2005
Subject: [Dwarf-discuss] Important Notice
Message-ID: <43550EA2.8000505@eagercon.com>

Please update your mailing address for the Dwarf Discussion
list to mailto:Dwarf-discuss at freestandards.org.

-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


From mperry  Tue Oct 18 21:49:30 2005
From: mperry (Michael Perry)
Date: Tue Oct 18 21:49:30 2005
Subject: [Dwarf-discuss] test to dwarf-discuss mail list
Message-ID: <4355CF84.2020602@lnxpowered.org>

testing the list. sorry.

-- 
Michael Perry | Do or do not. There is no try --Master Yoda
mperry at lnxpowered.org | http://www.lnxpowered.org


From eager  Tue Oct 18 23:58:15 2005
From: eager (Michael Eager)
Date: Tue Oct 18 23:58:15 2005
Subject: [Dwarf-discuss] DWARF 3 Public Review
Message-ID: <4355ED46.6010408@eagercon.com>

The DWARF Workgroup of The Free Standards Group is pleased
to announce the availability of the DWARF Version 3 Standard
for Public Review.  The DWARF Workgroup is a broad-based
committee representing both microprocessor vendors and
tool developers.

DWARF is used by many compilers and debuggers to support
debugging of C, C++, Java, Pascal, Fortran, Cobol, Ada,
and other programming languages.  A variety of processors
are supported, including x86, PowerPC, ARM, MIPS, and many
others, ranging from 8-bit to 64-bit processors.

Version 3 of the DWARF standard builds on the previous
version and includes support for C++ namespaces.  It extends
previous support for C, Java, Ada, Fortran and Cobol.  There
is improved support for optimized code, which has often
been difficult to debug.  Improvements have also been made
to make it easier to eliminate duplicate debugging information.
There is support for using DWARF data files in shared
libraries or having DWARF data files greater than 4Gb,
allowing for future growth in program size.

The DWARF Version 3 Standard is available from The Free
Standards Group without charge at http://dwarf.freestandards.org.
The Public Review period will run until December 1, 2005.
Comments about the DWARF Version 3 Standard are solicited
and may be submitted using a form on the web site.  All
comments will be reviewed by the DWARF Workgroup for
incorporation in Version 3 or possible consideration in a
future version.  Final publication of the DWARF 3 Standard
is planned for early 2006.  Information about the DWARF
mailing list is also available on the website.

-- 
Michael Eager, DWARF Workgroup Chair
Eager Consulting
1960 Park Blvd., Palo Alto, CA 94306
650-325-8077
eager at eagercon.com



From davea  Mon Oct 24 11:42:10 2005
From: davea (David Anderson)
Date: Mon Oct 24 11:42:10 2005
Subject: [Dwarf-discuss] Update to libdwarf/dwarfdump
Message-ID: <200510241837.j9OIb53W409248@quasar.engr.sgi.com>


	http://reality.sgiweb.org/davea
has a new dwarf.h, libdwarf, and dwarfdump that 
now handle all the new codes in the DWARF 3 public review
document which just came out on dwarf.freestandards.org.

libdwarf-20051024.tar.gz


David A.
.]


