projects
/
platform
/
upstream
/
elfutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 0.160
[platform/upstream/elfutils.git]
/
libdw
/
dwarf_cu_getdwarf.c
diff --git
a/libdw/memory-access.c
b/libdw/dwarf_cu_getdwarf.c
similarity index 68%
rename from
libdw/memory-access.c
rename to
libdw/dwarf_cu_getdwarf.c
index
7666fb6
..
f8a2e9b
100644
(file)
--- a/
libdw/memory-access.c
+++ b/
libdw/dwarf_cu_getdwarf.c
@@
-1,5
+1,5
@@
-/*
Out of line functions for memory-access.h macros
.
- Copyright (C) 20
05, 2006
Red Hat, Inc.
+/*
Retrieve Dwarf descriptor underlying a Dwarf_CU
.
+ Copyright (C) 20
14
Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@
-29,22
+29,19
@@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
+
+#include <stddef.h>
+
#include "libdwP.h"
#include "libdwP.h"
-#include "memory-access.h"
-uint64_t
-internal_function
-__libdw_get_uleb128 (uint64_t acc, unsigned int i, const unsigned char **addrp)
-{
- unsigned char __b;
- get_uleb128_rest_return (acc, i, addrp);
-}
-int64_t
-internal_function
-__libdw_get_sleb128 (int64_t acc, unsigned int i, const unsigned char **addrp)
+Dwarf *
+dwarf_cu_getdwarf (cu)
+ Dwarf_CU *cu;
{
{
- unsigned char __b;
- int64_t _v = acc;
- get_sleb128_rest_return (acc, i, addrp);
+ if (cu == NULL)
+ /* Some error occurred before. */
+ return NULL;
+
+ return cu->dbg;
}
}