diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2015-07-01 13:00:29 +0300 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2015-07-06 13:25:12 +0300 |
commit | 1479073b7e849fa03e5892eea0e0b5dadde1a98a (patch) | |
tree | e319568c0fc78a98afc712e1a7ac57a9650757a8 /target-xtensa/import_core.sh | |
parent | ddd44279fdbc545a9182cb642645af8a4672c267 (diff) | |
download | qemu-1479073b7e849fa03e5892eea0e0b5dadde1a98a.tar.gz |
target-xtensa: fix gdb register map construction
Due to different gdb overlay organization between windowed/call0
configurations core import script doesn't always work correctly.
Simplify the script: always copy complete gdb register map from overlay,
count registers at core registerstion time. Update existing cores.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target-xtensa/import_core.sh')
-rwxr-xr-x | target-xtensa/import_core.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/target-xtensa/import_core.sh b/target-xtensa/import_core.sh index 73791ec545..351bee41c2 100755 --- a/target-xtensa/import_core.sh +++ b/target-xtensa/import_core.sh @@ -22,8 +22,7 @@ mkdir -p "$TARGET" tar -xf "$OVERLAY" -C "$TARGET" --strip-components=1 \ --xform='s/core/core-isa/' config/core.h tar -xf "$OVERLAY" -O gdb/xtensa-config.c | \ - sed -n '1,/*\//p;/pc/,/a15/p' > "$TARGET"/gdb-config.c -NUM_REGS=$(grep XTREG "$TARGET"/gdb-config.c | wc -l) + sed -n '1,/*\//p;/XTREG/,/XTREG_END/p' > "$TARGET"/gdb-config.c cat <<EOF > "${TARGET}.c" #include "cpu.h" @@ -34,10 +33,9 @@ cat <<EOF > "${TARGET}.c" #include "core-$NAME/core-isa.h" #include "overlay_tool.h" -static const XtensaConfig $NAME __attribute__((unused)) = { +static XtensaConfig $NAME __attribute__((unused)) = { .name = "$NAME", .gdb_regmap = { - .num_regs = $NUM_REGS, .reg = { #include "core-$NAME/gdb-config.c" } |