diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-21 21:04:44 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-12-21 21:04:44 -0500 |
commit | 866a2ad35b75cbc60260c00b82bec2243877355f (patch) | |
tree | dd8508d3e0a8cffb1deab99d540d68b364443b27 /sim | |
parent | 3744b73e3bf74a6013661cdb76c8c5ae326cb403 (diff) | |
download | gdb-866a2ad35b75cbc60260c00b82bec2243877355f.zip gdb-866a2ad35b75cbc60260c00b82bec2243877355f.tar.gz gdb-866a2ad35b75cbc60260c00b82bec2243877355f.tar.bz2 |
sim: ppc: igen: fix -G handling
We weren't using the enable_p flag to see whether the option should
be enabled or disabled, and we weren't breaking out when done parsing.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/ppc/igen.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sim/ppc/igen.c b/sim/ppc/igen.c index 8aa19c7..9f64244 100644 --- a/sim/ppc/igen.c +++ b/sim/ppc/igen.c @@ -439,15 +439,22 @@ main(int argc, { case '=': icache_size = atoi (argp + strlen ("gen-icache") + 1); - code |= generate_with_icache; + if (enable_p) + code |= generate_with_icache; + else + code &= ~generate_with_icache; break; case '\0': - code |= generate_with_icache; + if (enable_p) + code |= generate_with_icache; + else + code &= ~generate_with_icache; break; default: error ("Expecting -Ggen-icache or -Ggen-icache=<N>\n"); } } + break; } case 'I': { |