[NaCl SDK] Unable to debug on GLIBC

We have been incorrectly passing in the name of the .nexe instead
of runnable-ld.so as the "program" which is being debugged to gdb.

BUG=271207
TBR=sbc@chromium.org

Review URL: https://codereview.chromium.org/22434005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216887 0039d316-1c4b-4281-b951-d872f2087c98
parent 6d398d59
......@@ -478,7 +478,8 @@ run_package: check_for_chrome all
GDB_ARGS += -D $(TC_PATH)/$(OSNAME)_x86_$(TOOLCHAIN)/bin/$(SYSARCH)-nacl-gdb
GDB_ARGS += -D $(abspath $(OUTDIR))/$(TARGET)_$(SYSARCH).nexe
GDB_ARGS += -D --eval-command="nacl-manifest $(abspath $(OUTDIR))/$(TARGET).nmf"
GDB_ARGS += -D $(GDB_DEBUG_TARGET)
.PHONY: debug
debug: check_for_chrome all $(PAGE)
......
......@@ -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.
#
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
......@@ -165,3 +165,10 @@ all: $(OUTDIR)/$(1).html
$(OUTDIR)/$(1).html: $(OUTDIR)/$(1).pexe
$(call LOG,CREATE_HTML,$$@,$(CREATE_HTML) -o $$@ $$^)
endef
#
# Determine which executable to pass into the debugger. For pnacl, this is
# the .bc -> .nexe translated app.
#
GDB_DEBUG_TARGET = $(abspath $(OUTDIR))/$(TARGET)_$(SYSARCH).nexe
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment