kgdb for mainline kernel: core-lite [patch 1/3]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Tom Rini
Here's where what Andi said about being able to get the
pt_regsstuff off the stack (I think that's what he said at least) started to confuse me slightly. But if I understand it right (and I never got around to testing this) we can replace thedo_schedule()stuffs at least with something likekgdb_get_pt_regs(), since (and I lost my notes on this, so it's probably not quite right) (thread_info->esp0)-1
No, that's the user space registers.
You don't need these registers really as long as you have the correct dwarf2 CFI description of all the code involved. gdb is then able to reconstruct them using the C stack by itself.
All it needs for that is esp and eip.
-Andi
Quoted 9 lines · Andi Kleen
Quoted 7 lines · Tom Rini
Here's where what Andi said about being able to get the
pt_regsstuff off the stack (I think that's what he said at least) started to confuse me slightly. But if I understand it right (and I never got around to testing this) we can replace thedo_schedule()stuffs at least with something likekgdb_get_pt_regs(), since (and I lost my notes on this, so it's probably not quite right) (thread_info->esp0)-1
Quoted 7 lines
No, that's the user space registers.
You don't need these registers really as long as you have the correct dwarf2 CFI description of all the code involved. gdb is then able to reconstruct them using the C stack by itself.
All it needs for that is esp and eip.
Ah, OK. Amit, how about for the expanded T-packet thing, we do what you suggested, except call it kgdb_arch_extra_regs() and let the arch fill out whatever regs it needs to. ESP/EIP for x86_64/i386, PC/SP for ppc32, etc, etc?
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 15 lines · Tom Rini
Quoted 14 lines · Andi Kleen
Quoted 6 lines · Tom Rini
Here's where what Andi said about being able to get the
pt_regsstuff off the stack (I think that's what he said at least) started to confuse me slightly. But if I understand it right (and I never got around to testing this) we can replace thedo_schedule()stuffs at least with something likekgdb_get_pt_regs(), since (and I lost my notes on this, so it's probably not quite right) (thread_info->esp0)-1No, that's the user space registers.
You don't need these registers really as long as you have the correct dwarf2 CFI description of all the code involved. gdb is then able to reconstruct them using the C stack by itself.
Quoted 6 lines
Quoted 1 line
All it needs for that is esp and eip.
Ah, OK. Amit, how about for the expanded T-packet thing, we do what you suggested, except call it
kgdb_arch_extra_regs()and let the arch fill out whatever regs it needs to. ESP/EIP for x86_64/i386, PC/SP for ppc32, etc, etc?
That'll be great, though it won't provide any more info to gdb, as gdb can get that info by 'g' packet.
Thread listing problem is with 'g' packet returning incomplete information for threads other than the current thread.
-Amit
Quoted 8 lines · Andi Kleen
Quoted 6 lines · Tom Rini
Here's where what Andi said about being able to get the
pt_regsstuff off the stack (I think that's what he said at least) started to confuse me slightly. But if I understand it right (and I never got around to testing this) we can replace thedo_schedule()stuffs at least with something likekgdb_get_pt_regs(), since (and I lost my notes on this, so it's probably not quite right) (thread_info->esp0)-1
Quoted 7 lines
No, that's the user space registers.
You don't need these registers really as long as you have the correct dwarf2 CFI description of all the code involved. gdb is then able to reconstruct them using the C stack by itself.
All it needs for that is esp and eip.
Yes. But as things stand, gdb 6.0 doesn't show stack traces correctly with esp and eip got from switch_to and gas 2.14 can't handle i386 dwarf2 CFI. Do we want to enforce getting a CVS version of gdb _and_ gas to build kgdb? Certainly not.
Current kgdb has a dependency on gdb 6.0. My RH9 gdb (5.3.x) can't talk with kgdb and complains about too long [sf]ThreadInfo packets. I don't like that either, but gdb 6.x should be standard on all distributions based on 2.6 kernels, so that's acceptable.
-Amit
Quoted 4 lines
Yes. But as things stand, gdb 6.0 doesn't show stack traces correctly with esp and eip got from
switch_toand gas 2.14 can't handle i386 dwarf2 CFI. Do we want to enforce getting a CVS version of gdb _and_ gas to build kgdb? Certainly not.
binutils 2.15 should be released soon anyways AFAIK. And for x86-64 this all works just fine (as demonstrated by Jim's/George's stub), so please get rid of it at least for x86-64. I really don't want user_schedule there, because it's completely unnecessary.
-Andi
Quoted 9 lines · Andi Kleen
Quoted 4 lines
Yes. But as things stand, gdb 6.0 doesn't show stack traces correctly with esp and eip got from
switch_toand gas 2.14 can't handle i386 dwarf2 CFI. Do we want to enforce getting a CVS version of gdb _and_ gas to build kgdb? Certainly not.binutils 2.15 should be released soon anyways AFAIK. And for x86-64 this all works just fine (as demonstrated by Jim's/George's stub), so please get rid of it at least for x86-64. I really don't want
user_schedulethere, because it's completely unnecessary.
I think more importantly, it's probably going to be one of those ugly things that will make it so much harder to get it into Linus' tree. So lets just say it'll require gdb 6.1 / binutils 2.15 for KGDB to work best.
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 11 lines · Tom Rini
Quoted 9 lines · Andi Kleen
Quoted 4 lines
Yes. But as things stand, gdb 6.0 doesn't show stack traces correctly with esp and eip got from
switch_toand gas 2.14 can't handle i386 dwarf2 CFI. Do we want to enforce getting a CVS version of gdb _and_ gas to build kgdb? Certainly not.binutils 2.15 should be released soon anyways AFAIK. And for x86-64 this all works just fine (as demonstrated by Jim's/George's stub), so please get rid of it at least for x86-64. I really don't want
user_schedulethere, because it's completely unnecessary.
Quoted 4 lines
I think more importantly, it's probably going to be one of those ugly things that will make it so much harder to get it into Linus' tree. So lets just say it'll require gdb 6.1 / binutils 2.15 for KGDB to work best.
If we are enforcing this we need to do it correctly: is there any way to check from source code whether binutils version is correct (even a gas check will suffice)
-Amit
On Thu, 11 Mar 2004 10:27:51 +0530 "Amit S. Kale" <[email protected]> wrote:
| On Wednesday 10 Mar 2004 8:57 pm, Tom Rini wrote: | > On Wed, Mar 10, 2004 at 01:36:05PM +0100, Andi Kleen wrote: | > > > Yes. But as things stand, gdb 6.0 doesn't show stack traces correctly | > > > with esp and eip got from switch_to and gas 2.14 can't handle i386 | > > > dwarf2 CFI. Do we want to enforce getting a CVS version of gdb _and_ | > > > gas to build kgdb? Certainly not. | > > | > > binutils 2.15 should be released soon anyways AFAIK. And for x86-64 this | > > all works just fine (as demonstrated by Jim's/George's stub), so please | > > get rid of it at least for x86-64. I really don't want user_schedule | > > there, because it's completely unnecessary. | > | > I think more importantly, it's probably going to be one of those ugly | > things that will make it so much harder to get it into Linus' tree. So | > lets just say it'll require gdb 6.1 / binutils 2.15 for KGDB to work | > best. | | If we are enforcing this we need to do it correctly: is there any way to check | from source code whether binutils version is correct (even a gas check will | suffice)
Documentation/Changes says to use "ld -v" for binutils version.
--
~Randy
Quoted 3 lines
If we are enforcing this we need to do it correctly: is there any way to check from source code whether binutils version is correct (even a gas check will suffice)
The latest 2.6 kernel has a makefile macro to check the gcc version. You could probably adapt that to check binutils too.
-Andi