Messages in this thread |  | | From | Tom Tromey <> | Subject | Re: [PATCH v5 13/20] scripts/gdb: Add is_target_arch helper | Date | Wed, 13 Feb 2013 14:38:28 -0700 |
| |
>>>>> "Jan" == Jan Kiszka <jan.kiszka@siemens.com> writes:
Jan> +def is_target_arch(arch): Jan> + global target_arch Jan> + if target_arch == None: Jan> + target_arch = gdb.execute("show architecture", False, True) Jan> + return target_arch.find(arch) >= 0
FYI - the next gdb will have a Frame.architecture method for getting the architecture of a frame. You might consider using it when it is available. "show architecture" is mildly unfortunate to cache given its "auto" behavior.
Tom
|  |