summaryrefslogtreecommitdiff
path: root/usr/src/tools/ctf/dwarf/common/cmplrs
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2011-06-08 17:36:48 -0400
committerRichard Lowe <richlowe@richlowe.net>2011-06-08 17:36:48 -0400
commit49d3bc91e27cd871b950d56c01398fa2f2e12ab4 (patch)
treeb7edaae89f4db21b8980ec0d3f15185433374cfd /usr/src/tools/ctf/dwarf/common/cmplrs
parent10a2419a4aad5cd9407427cea2b24d9572bca16d (diff)
downloadillumos-joyent-49d3bc91e27cd871b950d56c01398fa2f2e12ab4.tar.gz
1057 should correctly integrate libdwarf sources
Reviewed by: Gordon Ross <gwr@nexenta.com> Reviewed by: Garrett D'Amore <garrett@nexenta.com> Approved by: Eric Schrock <eric.schrock@delphix.com> --HG-- rename : usr/src/tools/ctf/dwarf/dwarf.h => usr/src/tools/ctf/dwarf/common/dwarf.h rename : usr/src/tools/ctf/dwarf/libdwarf.h => usr/src/tools/ctf/dwarf/common/libdwarf.h
Diffstat (limited to 'usr/src/tools/ctf/dwarf/common/cmplrs')
-rw-r--r--usr/src/tools/ctf/dwarf/common/cmplrs/dwarf_addr_finder.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/usr/src/tools/ctf/dwarf/common/cmplrs/dwarf_addr_finder.h b/usr/src/tools/ctf/dwarf/common/cmplrs/dwarf_addr_finder.h
new file mode 100644
index 0000000000..6cd4ff7445
--- /dev/null
+++ b/usr/src/tools/ctf/dwarf/common/cmplrs/dwarf_addr_finder.h
@@ -0,0 +1,55 @@
+/*
+ dwarf_addr_finder.h
+ $Source: /plroot/cmplrs.src/v7.4.2m/.RCS/PL/include/cmplrs/RCS/dwarf_addr_finder.h,v $
+ $Date: 2002/06/11 17:49:06 $
+
+ Defines user interface.
+
+*/
+
+/* return codes for functions
+*/
+#define DW_DLV_NO_ENTRY -1
+#define DW_DLV_OK 0
+#define DW_DLV_ERROR 1
+
+
+/* the following are the 'section' number passed to the called-back
+ function.
+ The called-back application must translate this to the
+ appropriate elf section number/pointer.
+
+ Putting this burden on the application avoids having to store
+ the numbers in the Dwarf_Debug structure (thereby saving space
+ for most consumers).
+*/
+#define DW_SECTION_INFO 0
+#define DW_SECTION_FRAME 1
+#define DW_SECTION_ARANGES 2
+#define DW_SECTION_LINE 3
+#define DW_SECTION_LOC 4 /* .debug_loc */
+
+/* section is one of the above codes: it specifies a section.
+ secoff is the offset in the dwarf section.
+ existingAddr is the value at the specified offset (so the
+ called back routine can sanity check the proceedings).
+ It's up to the caller to know the size of an address (4 or 8)
+ and update the right number of bytes.
+*/
+typedef int (*Dwarf_addr_callback_func) (int /*section*/,
+ Dwarf_Off /*secoff*/, Dwarf_Addr /*existingAddr*/);
+
+/* call this to do the work: it calls back thru cb_func
+ once per each address to be modified.
+ Once this returns you are done.
+ Returns DW_DLV_OK if finished ok.
+ Returns DW_DLV_ERROR if there was some kind of error, in which
+ the dwarf error number was passed back thu the dwerr ptr.
+ Returns DW_DLV_NO_ENTRY if there are no relevant dwarf sections,
+ so there were no addresses to be modified (and none
+ called back).
+*/
+int _dwarf_addr_finder(dwarf_elf_handle elf_file_ptr,
+ Dwarf_addr_callback_func cb_func,
+ int *dwerr);
+