Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61bb9cf3 authored by David 'Digit' Turner's avatar David 'Digit' Turner Committed by Android (Google) Code Review
Browse files

Merge "debuggerd: Fix missing include."

parents ab1ee96c 2c259914
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include <cutils/properties.h>

#include <linux/input.h>
#include <linux/user.h>

#include "utility.h"

+5 −5
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ struct symbol_table *symbol_table_create(const char *filename)
    int length;
    char *base;

    XLOG("Creating symbol table for %s\n", filename);
    XLOG2("Creating symbol table for %s\n", filename);
    int fd = open(filename, O_RDONLY);

    if(fd < 0) {
@@ -126,7 +126,7 @@ struct symbol_table *symbol_table_create(const char *filename)
                dynsymbol_count++;
            }
        }
        XLOG("Dynamic Symbol count: %d\n", dynsymbol_count);
        XLOG2("Dynamic Symbol count: %d\n", dynsymbol_count);
    }

    if (sym_idx != -1) {
@@ -139,7 +139,7 @@ struct symbol_table *symbol_table_create(const char *filename)
                symbol_count++;
            }
        }
        XLOG("Symbol count: %d\n", symbol_count);
        XLOG2("Symbol count: %d\n", symbol_count);
    }

    // Now, create an entry in our symbol table structure for each symbol...
@@ -160,7 +160,7 @@ struct symbol_table *symbol_table_create(const char *filename)
                table->symbols[j].name = strdup(dynstr + dynsyms[i].st_name);
                table->symbols[j].addr = dynsyms[i].st_value;
                table->symbols[j].size = dynsyms[i].st_size;
                XLOG("name: %s, addr: %x, size: %x\n",
                XLOG2("name: %s, addr: %x, size: %x\n",
                    table->symbols[j].name, table->symbols[j].addr, table->symbols[j].size);
                j++;
            }
@@ -176,7 +176,7 @@ struct symbol_table *symbol_table_create(const char *filename)
                table->symbols[j].name = strdup(str + syms[i].st_name);
                table->symbols[j].addr = syms[i].st_value;
                table->symbols[j].size = syms[i].st_size;
                XLOG("name: %s, addr: %x, size: %x\n",
                XLOG2("name: %s, addr: %x, size: %x\n",
                    table->symbols[j].name, table->symbols[j].addr, table->symbols[j].size);
                j++;
            }
+9 −0
Original line number Diff line number Diff line
@@ -57,10 +57,19 @@ const char *map_to_name(mapinfo *mi, unsigned pc, const char* def);
extern void _LOG(int tfd, bool in_tombstone_only, const char *fmt, ...);

#define LOG(fmt...) _LOG(-1, 0, fmt)

/* Set to 1 for normal debug traces */
#if 0
#define XLOG(fmt...) _LOG(-1, 0, fmt)
#else
#define XLOG(fmt...) do {} while(0)
#endif

/* Set to 1 for chatty debug traces. Includes all resolved dynamic symbols */
#if 0
#define XLOG2(fmt...) _LOG(-1, 0, fmt)
#else
#define XLOG2(fmt...) do {} while(0)
#endif

#endif