summaryrefslogtreecommitdiff
path: root/addr2line.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-14 23:45:33 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-14 23:45:33 (GMT)
commitf572aeb71f53731ee1d8b351c959b93ed9eb91f5 (patch)
tree4105762166b26845792b0ff41af958fcc8436c40 /addr2line.c
parentbb9eea90659a6e95f30c9ea382c4de60932c2319 (diff)
Moved hexdump macro before used
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'addr2line.c')
-rw-r--r--addr2line.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/addr2line.c b/addr2line.c
index 71031c2..e5442cc 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -1217,6 +1217,30 @@ di_find_abbrev(DebugInfoReader *reader, uint64_t abbrev_number)
#if 0
static void
+hexdump0(const unsigned char *p, size_t n)
+{
+ size_t i;
+ fprintf(stderr, " 0 1 2 3 4 5 6 7 8 9 A B C D E F\n");
+ for (i=0; i < n; i++){
+ switch (i & 15) {
+ case 0:
+ fprintf(stderr, "%02zd: %02X ", i/16, p[i]);
+ break;
+ case 15:
+ fprintf(stderr, "%02X\n", p[i]);
+ break;
+ default:
+ fprintf(stderr, "%02X ", p[i]);
+ break;
+ }
+ }
+ if ((i & 15) != 15) {
+ fprintf(stderr, "\n");
+ }
+}
+#define hexdump(p,n) hexdump0((const unsigned char *)p, n)
+
+static void
div_inspect(DebugInfoValue *v)
{
switch (v->type) {
@@ -1507,30 +1531,6 @@ fail:
return 0;
}
-static void
-hexdump0(const unsigned char *p, size_t n)
-{
- size_t i;
- fprintf(stderr, " 0 1 2 3 4 5 6 7 8 9 A B C D E F\n");
- for (i=0; i < n; i++){
- switch (i & 15) {
- case 0:
- fprintf(stderr, "%02zd: %02X ", i/16, p[i]);
- break;
- case 15:
- fprintf(stderr, "%02X\n", p[i]);
- break;
- default:
- fprintf(stderr, "%02X ", p[i]);
- break;
- }
- }
- if ((i & 15) != 15) {
- fprintf(stderr, "\n");
- }
-}
-#define hexdump(p,n) hexdump0((const unsigned char *)p, n)
-
/* read file and fill lines */
static uintptr_t
fill_lines(int num_traces, void **traces, int check_debuglink,