Article View: gnu.gdb.bug
Article #1849Understanding gdb way down inside.
From: george anzinger
Date: Thu, 13 Jun 2002 21:33
Date: Thu, 13 Jun 2002 21:33
29 lines
2285 bytes
2285 bytes
I am working on a kgdb patch for linux x86 kernels. It correctly treats kernel tasks as threads and allows one to look at each task in the kernel. The problem I am having is understanding how gdb does the "up" command. I assumed that it would use the EBP register to find the previous EBP (*EBP) and PC (*(EBP+4)) as well as the previous ESP (EBP+8). It seems to do this "some" of the time. In the failing case it seems to be finding PC by using *ESP, which would seem to imply that gdb thinks there is no stack frame AND that ESP is as it was when the function was entered. I see several accesses to *PC and wonder if someone could tell me what is going on here, or at least what bit of code in gdb to study to figure it out. The net result of this problem is that an additional bogus frame is included in the back trace. I would also like to know if it is possible to get gdb to correctly "UP" an interrupt frame. I am hopping to do what is needed in the kernel resident stub, if only I know what that is. -- George Anzinger george@mvista.com High-res-timers: http://sourceforge.net/projects/high-res-timers/ Real time sched: http://sourceforge.net/projects/rtsched/ Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
Technical Details
Message-ID:
<3D090FA3.50EC22F4@mvista.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed.mathworks.com!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdbShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,6ec9663e2cad7600,start X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 2002-06-13 16:01:46 PST x-uunet-gateway: mr0.ash.ops.us.uu.net from bug-gdb to gnu.gdb.bug; Thu, 13 Jun 2002 23:01:45 GMT Sender: george@data.mvista.com Message-ID: <3D090FA3.50EC22F4@mvista.com> Date: Thu, 13 Jun 2002 14:33:23 -0700 From: george@mvista.com (george anzinger) Organization: Monta Vista Software X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12-20b i686) X-Accept-Language: en MIME-Version: 1.0 Subject: Understanding gdb way down inside. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Approved: bug-gdb-request@mail.gnu.org Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed.mathworks.com!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb Lines: 29