Let me second what Greg said here. The Hexagon simulator supports many different core versions, with different register sets. Having the simulator implement qRegisterInfo lets LLDB not care which core version it's talking to. I could look at the target binary, but we can legally run a v4 binary on a v5 core, so that doesn't work.
I fully expect to be able to use today's LLDB to talk to a hypothetical new Hexagon core 5 years from now. It won't care about the registers because the simulator/target stub will tell it what they are. -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Greg Clayton Sent: Monday, February 23, 2015 3:36 PM To: Keno Fischer Cc: lldb-dev Subject: Re: [lldb-dev] Is qRegisterInfo required Not really. We have dealt with changing ARM registers over the years with iOS and by far the best thing we did was have the "debugserver" binary on the device tell us what registers are available since it makes things really simple. If not, we have to get the CPUID from the chip and try to figure out which generation it was and then figure out what registers were available with kernel version 1.2.3. So we let the low level software that runs on a device figure it out as it often has access to sysctl() and many other local functions that help it to determine what registers are available. Otherwise you must allow the code on the remote side of this (LLDB) figure it out by calling down through the GDB remote interface and possibly having to add packets to return the results of a sysctl() call, or call any other system functions. It just makes more sense to determine this on the device in the GDB server since it it always on the device in question. Greg Clayton _______________________________________________ lldb-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
