Re: [PATCH v5 13/20] scripts/gdb: Add is_target_arch helper

From: Tom Tromey
Date: Wed Feb 13 2013 - 16:39:03 EST

>>>>> "Jan" == Jan Kiszka <jan.kiszka@xxxxxxxxxxx> 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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at