Index: native_client_sdk/src/tools/nacl_gcc.mk |
diff --git a/native_client_sdk/src/tools/nacl_gcc.mk b/native_client_sdk/src/tools/nacl_gcc.mk |
index d0467144299d5cc8c69dc8b0b9fd2ae056332a53..c176d9bf47827ea944a8711472a70b81be65f066 100644 |
--- a/native_client_sdk/src/tools/nacl_gcc.mk |
+++ b/native_client_sdk/src/tools/nacl_gcc.mk |
@@ -429,3 +429,22 @@ all: $(OUTDIR)/$(1).html |
$(OUTDIR)/$(1).html: $(EXECUTABLES) |
$(call LOG,CREATE_HTML,$$@,$(CREATE_HTML) $(HTML_FLAGS) -o $$@ $$^) |
endef |
+ |
+ |
+# |
+# Determine which executable to pass into the debugger. For newlib |
+# this is the NEXE which will actually be used. For glibc, runnable-ld.so |
+# is the "app", and the "app" is actual an .so we load. |
binji
2013/08/11 00:39:13
s/actual/actually/
|
+# |
+ifeq (x86_32,$(SYSARCH)) |
+LIB_NAME = lib32 |
+else |
+LIB_NAME = lib64 |
+endif |
+ |
+ |
+ifeq (newlib,$(TOOLCHAIN)) |
+GDB_DEBUG_TARGET = $(abspath $(OUTDIR))/$(TARGET)_$(SYSARCH).nexe |
+else |
+GDB_DEBUG_TARGET = $(abspath $(OUTDIR))/$(LIB_NAME)/runnable-ld.so |
+endif |