[gdb] Do not set disassembly-flavor on non-x86 platforms.

The `set disassembly-flavor` command is only available when debugging a x86
target. On other targets, sourcing `tools/gdbinit` fails as a result.

Sadly, we have to resort to using python's exception to ignore errors and carry
on.

NOTRY=true

Change-Id: If37450ee5bca43d5edb02fa9a5b218d7992f8885
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1847353
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64182}
This commit is contained in:
Pierre Langlois 2019-10-09 11:55:16 +01:00 committed by Commit Bot
parent a6f6381fbe
commit f1c5be441e

View File

@ -138,7 +138,13 @@ Find the location of a given address in V8 pages.
Usage: heap_find address
end
set disassembly-flavor intel
# The 'disassembly-flavor' command is only available on i386 and x84_64.
python
try:
gdb.execute("set disassembly-flavor intel")
except gdb.error:
pass
end
set disable-randomization off
# Install a handler whenever the debugger stops due to a signal. It walks up the