]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdw/
authorRoland McGrath <roland@redhat.com>
Tue, 9 Aug 2005 10:31:08 +0000 (10:31 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 9 Aug 2005 10:31:08 +0000 (10:31 +0000)
2005-08-09  Roland McGrath  <roland@redhat.com>

* dwarf_end.c: Add INTDEF.
* dwarf_error.c (dwarf_errmsg): Likewise.
* libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.

libdwfl/
2005-08-09  Roland McGrath  <roland@redhat.com>

* libdwflP.h: Include ../libdw/libdwP.h for its INTDECLs.
* cu.c: Use INTUSE on dwarf_* calls.
* dwfl_error.c: Likewise.
* dwfl_module.c: Likewise.
* dwfl_module_getdwarf.c: Likewise.
* dwfl_module_getsrc_file.c: Likewise.
* lines.c: Likewise.

12 files changed:
libdw/ChangeLog
libdw/dwarf_end.c
libdw/dwarf_error.c
libdw/libdwP.h
libdwfl/ChangeLog
libdwfl/cu.c
libdwfl/dwfl_error.c
libdwfl/dwfl_module.c
libdwfl/dwfl_module_getdwarf.c
libdwfl/dwfl_module_getsrc_file.c
libdwfl/libdwflP.h
libdwfl/lines.c

index d87cf11c889eb8dc65b2f312afaea673f04ae464..3e5fbc3b2fdba741addf049db521c21b19753208 100644 (file)
@@ -1,3 +1,9 @@
+2005-08-09  Roland McGrath  <roland@redhat.com>
+
+       * dwarf_end.c: Add INTDEF.
+       * dwarf_error.c (dwarf_errmsg): Likewise.
+       * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
+
 2005-08-01  Roland McGrath  <roland@redhat.com>
 
        * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
index 935bd3d27405e889d0c26cc758ba3f79ffac666d..3328a7ca1c91bc26252bbf5f131f371b0d261721 100644 (file)
@@ -73,3 +73,4 @@ dwarf_end (dwarf)
 
   return 0;
 }
+INTDEF(dwarf_end)
index 85d928c94f2da9be0be9fcb41d4c7b0cd563c02f..291dbc6d2f97808fbbfbbfb0f80b448ad3e0aec4 100644 (file)
@@ -155,6 +155,7 @@ dwarf_errmsg (error)
 
   return _(errmsgs[error == -1 ? last_error : error]);
 }
+INTDEF(dwarf_errmsg)
 
 
 #ifndef USE_TLS
index 05e02aa318865c886d051c65e120fccf8dafce8a..062b3dce7df66539cf260a70ebeea1b2533cce7b 100644 (file)
@@ -353,6 +353,8 @@ INTDECL (dwarf_attr_integrate)
 INTDECL (dwarf_begin_elf)
 INTDECL (dwarf_child)
 INTDECL (dwarf_dieoffset)
+INTDECL (dwarf_end)
+INTDECL (dwarf_errmsg)
 INTDECL (dwarf_formaddr)
 INTDECL (dwarf_formblock)
 INTDECL (dwarf_formref)
index 91523860f3db5f1d5f9d36e92d7ca2a17c69806c..6c22f8a8aa814a8c476fdd6d639180250a6412f8 100644 (file)
@@ -1,3 +1,13 @@
+2005-08-09  Roland McGrath  <roland@redhat.com>
+
+       * libdwflP.h: Include ../libdw/libdwP.h for its INTDECLs.
+       * cu.c: Use INTUSE on dwarf_* calls.
+       * dwfl_error.c: Likewise.
+       * dwfl_module.c: Likewise.
+       * dwfl_module_getdwarf.c: Likewise.
+       * dwfl_module_getsrc_file.c: Likewise.
+       * lines.c: Likewise.
+
 2005-08-07  Roland McGrath  <roland@redhat.com>
 
        * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): When module
index 44207097d4980bc27cfbd008a6f6dfc779383f7e..cf7e3887f2bb600e12d06d0e6ee3e92ee1cc8228 100644 (file)
@@ -30,7 +30,7 @@ addrarange (Dwfl_Module *mod, Dwarf_Addr addr, struct dwfl_arange **arange)
   if (mod->aranges == NULL)
     {
       Dwarf_Aranges *dwaranges;
-      if (dwarf_getaranges (mod->dw, &dwaranges, NULL) != 0)
+      if (INTUSE(dwarf_getaranges) (mod->dw, &dwaranges, NULL) != 0)
        return DWFL_E_LIBDW;
 
       struct dwfl_arange *aranges = malloc (dwaranges->naranges
@@ -176,7 +176,7 @@ intern_cu (Dwfl_Module *mod, Dwarf_Off cuoff, struct dwfl_cu **result)
          cu->lines = NULL;
 
          /* XXX use non-searching lookup */
-         Dwarf_Die *die = dwarf_offdie (mod->dw, cuoff, &cu->die);
+         Dwarf_Die *die = INTUSE(dwarf_offdie) (mod->dw, cuoff, &cu->die);
          if (die == NULL)
            return DWFL_E_LIBDW;
          assert (die == &cu->die);
@@ -230,8 +230,8 @@ __libdwfl_nextcu (Dwfl_Module *mod, struct dwfl_cu *lastcu,
     {
       size_t cuhdrsz;
       Dwarf_Off nextoff;
-      if (dwarf_nextcu (mod->dw, cuoff, &nextoff, &cuhdrsz,
-                       NULL, NULL, NULL) != 0)
+      if (INTUSE(dwarf_nextcu) (mod->dw, cuoff, &nextoff, &cuhdrsz,
+                               NULL, NULL, NULL) != 0)
        return DWFL_E_LIBDW;
 
       Dwfl_Error result = intern_cu (mod, cuoff + cuhdrsz, nextp);
index 4bd1a50fcfc9f794b07d096d20a537bdf7e214be..553c585f94abec3c5d7f31acc27b3bfde3c356f5 100644 (file)
@@ -113,7 +113,7 @@ canonicalize (Dwfl_Error error)
       value = DWFL_E (LIBELF, elf_errno ());
       break;
     case DWFL_E_LIBDW:
-      value = DWFL_E (LIBDW, dwarf_errno ());
+      value = DWFL_E (LIBDW, INTUSE(dwarf_errno) ());
       break;
 #if 0
     DWFL_E_LIBEBL:
@@ -186,7 +186,7 @@ dwfl_errmsg (error)
     case OTHER_ERROR (LIBELF):
       return elf_errmsg (error & 0xffff);
     case OTHER_ERROR (LIBDW):
-      return dwarf_errmsg (error & 0xffff);
+      return INTUSE(dwarf_errmsg) (error & 0xffff);
 #if 0
     case OTHER_ERROR (LIBEBL):
       return ebl_errmsg (error & 0xffff);
index a6d9f41f3a8edd8ce79ceddbe3038367ff2f122e..eecdb5247ca934943678e6aa40cf951765cabbb2 100644 (file)
@@ -45,7 +45,7 @@ __libdwfl_module_free (Dwfl_Module *mod)
     }
 
   if (mod->dw != NULL)
-    dwarf_end (mod->dw);
+    INTUSE(dwarf_end) (mod->dw);
 
   if (mod->ebl != NULL)
     ebl_closebackend (mod->ebl);
index 03cf8f05985b641a2f3654910c9d2df173dd504f..1583c7a8710f98a7a4a581b61df093d4f2a5ed04 100644 (file)
@@ -304,10 +304,10 @@ load_dw (Dwfl_Module *mod, Elf *debugfile)
        return result;
     }
 
-  mod->dw = dwarf_begin_elf (debugfile, DWARF_C_READ, NULL);
+  mod->dw = INTUSE(dwarf_begin_elf) (debugfile, DWARF_C_READ, NULL);
   if (mod->dw == NULL)
     {
-      int err = dwarf_errno ();
+      int err = INTUSE(dwarf_errno) ();
       return err == DWARF_E_NO_DWARF ? DWFL_E_NO_DWARF : DWFL_E (LIBDW, err);
     }
 
index 81f57ed6f9f4d3e9e0c367dc76883907f2462cbc..7c617dd8582103f89428bc616a159b181e4a86a8 100644 (file)
@@ -36,7 +36,7 @@ dwfl_module_getsrc_file (Dwfl_Module *mod,
         && cu != NULL
         && (error = __libdwfl_cu_getsrclines (cu)) == DWFL_E_NOERROR)
     {
-      inline const char *dwarf_line_file (const Dwarf_Line *line)
+      inline const char *INTUSE(dwarf_line_file) (const Dwarf_Line *line)
        {
          return line->files->info[line->file].name;
        }
@@ -46,7 +46,7 @@ dwfl_module_getsrc_file (Dwfl_Module *mod,
        }
       inline const char *dwfl_line_file (const Dwfl_Line *line)
        {
-         return dwarf_line_file (dwfl_line (line));
+         return INTUSE(dwarf_line_file) (dwfl_line (line));
        }
 
       /* Search through all the line number records for a matching
@@ -65,7 +65,7 @@ dwfl_module_getsrc_file (Dwfl_Module *mod,
            }
          else
            {
-             const char *file = dwarf_line_file (line);
+             const char *file = INTUSE(dwarf_line_file) (line);
              if (file != lastfile)
                {
                  /* Match the name with the name the user provided.  */
@@ -87,7 +87,8 @@ dwfl_module_getsrc_file (Dwfl_Module *mod,
          /* Determine whether this is the best match so far.  */
          size_t inner;
          for (inner = 0; inner < cur_match; ++inner)
-           if (dwfl_line_file (match[inner]) == dwarf_line_file (line))
+           if (dwfl_line_file (match[inner])
+               == INTUSE(dwarf_line_file) (line))
              break;
          if (inner < cur_match
              && (dwfl_line (match[inner])->line != line->line
index e8fb88c8cdb29a44ce027c238c0a9cac3773a115..772bf29c5e08fd86fb0116437c4119cd4736b689 100644 (file)
@@ -25,6 +25,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "../libdw/libdwP.h"   /* We need its INTDECLs.  */
+
 /* gettext helper macros.  */
 #define _(Str) dgettext ("elfutils", Str)
 
index 3eb4c195dc57e7aefd53249bd1952fd5a9fa2bd8..d48b3803db98b2049afe54de7b52af0735cebe28 100644 (file)
@@ -22,7 +22,7 @@ __libdwfl_cu_getsrclines (struct dwfl_cu *cu)
     {
       Dwarf_Lines *lines;
       size_t nlines;
-      if (dwarf_getsrclines (&cu->die, &lines, &nlines) != 0)
+      if (INTUSE(dwarf_getsrclines) (&cu->die, &lines, &nlines) != 0)
        return DWFL_E_LIBDW;
 
       cu->lines = malloc (offsetof (struct Dwfl_Lines, idx[nlines]));