Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Issue 1131002: A pair of scripts to make it easier to run and debug 32 bit executables on 64 bit systems (Closed)

Created:
10 years, 9 months ago by rginda
Modified:
9 years, 7 months ago
Reviewers:
Will Drewry
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

A pair of scripts to make it easier to run and debug 32 bit executables on 64 bit systems For Example: # run the 32 bit binary located ad ../platform/foo/a.out $ run_32bit.sh ../platform/foo/a.out # run a.out from the current directory, and pass it the --verbose=3 command line option $ ../../scripts/run_32bit.sh -- a.out --verbose=3 # debug a.out from the current directory, include ../v8 in the library search path $ LIB_PATHS='../v8/' ../../scripts/debug_32bit.sh a.out run_32bit.sh runs a 32bit executable, debug_32bit.sh starts up gdb so that it's ready to debug a 32bit target. Both scripts work from in or out of the chroot. If you're running from outside the chroot, you can pass a --chroot command line option to locate the chroot, otherwise a default is computed through the normal mechanism. Pass the 32 bit target as the parameter to either of these scripts. If you need to provide additional parameters to your command, then you should use -- to signify the end of *_32bit.sh parameters. These could be useful to people developing parts of chromeos that can be easily isolated from the rest of the system. If your code doesn't NEED to run on a chromeos device it can be a bit easier to try it out on your owm machine during dev/test.

Patch Set 1 #

Total comments: 2

Patch Set 2 : add quotes to "$@" and use exec #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -0 lines) Patch
A src/scripts/debug_32bit.sh View 1 1 chunk +52 lines, -0 lines 0 comments Download
A src/scripts/run_32bit.sh View 1 1 chunk +38 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
rginda
10 years, 9 months ago (2010-03-18 20:22:08 UTC) #1
Will Drewry
LGTM after the "$@" stuff is fixed up. I feel like maybe we could come ...
10 years, 9 months ago (2010-03-18 20:59:59 UTC) #2
rginda
10 years, 9 months ago (2010-03-18 21:06:47 UTC) #3
Adding /lib32 to LD_LIBRARY_PATH seems to fix all my woes, but I've only tried
it with a dirt simple program so far.

I'm working on getting a v8 ebuild, and once that's done I'll actually need to
debug something more complicated.  I'll hold off on landing these scripts until
I've successfully used them on a more complicate target.

Powered by Google App Engine
This is Rietveld 408576698