Home » Uncategorized » gdb in x86_64-linux-musl

gdb in x86_64-linux-musl

cp debugreg.h(files) from linux source to system header directory.

vi /include/sys/debugreg.h

+ #include <asm-generic/percpu.h>

+ #include <linux/percpu-defs.h>

vi gdb-7.6/gdb/linux-nat.c

+ #define W_STOPCODE(sig) ((sig) << 8 | 0x7f)

vi /include/linux/uio.h

+ #if 0

struct iovec {…}

+ #endif

vi gdb-7.6/gdb/common/linux-ptrace.h

+ #define __NEED_pid_t

+ #include <bits/alltypes.h>

vi gdb-7.6/gdb/linux-thread-db.c

+ #define LIBTHREAD_DB_SO “fake.so”

+ #define LIBTHREAD_DB_SEARCH_PATH “/lib”

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s