From: Avi W. <WE...@il...> - 2003-01-30 13:53:26
|
Hi , I have a debuging problem using ddd (3.3.1) with UML 2.4.19-48 ( but also with earlier releases , like UML 2.4.18-35 ) under host kernel of 2.4.19 and 2.4.2-2 . Please note that ddd run on the host and not inside UML. Here is the senario: I have compiled UML and its modules (gcc 2.96) as written in the HowTo documentation. Compiled my kernel module against that UML , booted up UML with debug option using ddd and insmod my module. Then typed ^c inside ddd ( in gdb window) and typed : add-symbole-file /path/to/module/on/host <address> where address is module_list + 0x54. Checked that there where no offsets in module_list->init and module_list->cleanup. Here is my problem: ddd( or gdb which runs under it ) could recongnize ( file name and line number within that file ) almost only static functions ( very few non static ones ) , in my module. Please note that the functions are regular ones and *not* inlined. When setting a breakpoint for non static ones , ddd prints one of the following: (1) their address only. (2) a wrong file name and line number . For example , a filename within the UML source : /usr/src/uml/linux/include/linux/highmem.h . When ddd comes to a breakpointed function , it doesn't display its code, but tells that it is waiting to finish that function. I will appreciate it if you can provide any insight. Has anyone seen anything like this? Thank you , Avi Weit. |
From: Jan H. <bu...@uc...> - 2003-01-31 10:17:58
|
On Thu, Jan 30, 2003 at 03:51:44PM +0200, Avi Weit wrote: > Hi , > > I have a debuging problem using ddd (3.3.1) with UML 2.4.19-48 ( but also > with earlier releases , like UML 2.4.18-35 ) under host kernel of 2.4.19 > and 2.4.2-2 . Please note that ddd run on the host and not inside UML. > > Here is the senario: > > I have compiled UML and its modules (gcc 2.96) as written in the HowTo ^^^^ If this is not a typo, it's probablt the problem! No official gcc-2.96 exists. It's a RedHat prerelease of gcc-3.0 and is not able to compile kernel properly. In addition I have recently seen gdb getting all wrong when I used gcc-3.*. So try with gcc-2.95 first. Note: If it's really a RedHat system, gcc-2.95 should exists under a name `kgcc' there. > documentation. > Compiled my kernel module against that UML , booted up UML with debug > option using ddd and insmod my module. Then typed ^c > inside ddd ( in gdb window) and typed : > add-symbole-file /path/to/module/on/host <address> where address is > module_list + 0x54. Checked that there where no offsets in > module_list->init and module_list->cleanup. > > Here is my problem: > ddd( or gdb which runs under it ) could recongnize ( file name and line > number within that file ) almost only static functions ( very few non > static ones ) , in > my module. Please note that the functions are regular ones and *not* > inlined. When setting a breakpoint for non static ones , ddd prints one of > the following: > (1) their address only. > (2) a wrong file name and line number . For example , a filename within the > UML source : /usr/src/uml/linux/include/linux/highmem.h . > > When ddd comes to a breakpointed function , it doesn't display its code, > but tells that it is waiting to finish that function. > > I will appreciate it if you can provide any insight. Has anyone seen > anything like this? > > Thank you , > Avi Weit. > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > User-mode-linux-devel mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bu...@uc...> |
From: Muli Ben-Y. <mu...@mu...> - 2003-01-31 10:25:26
|
On Fri, Jan 31, 2003 at 11:17:43AM +0100, Jan Hudec wrote: > On Thu, Jan 30, 2003 at 03:51:44PM +0200, Avi Weit wrote: > > Hi , > > > > I have a debuging problem using ddd (3.3.1) with UML 2.4.19-48 ( but also > > with earlier releases , like UML 2.4.18-35 ) under host kernel of 2.4.19 > > and 2.4.2-2 . Please note that ddd run on the host and not inside UML. > > > > Here is the senario: > > > > I have compiled UML and its modules (gcc 2.96) as written in the HowTo > ^^^^ > If this is not a typo, it's probablt the problem! No official gcc-2.96 > exists. It's a RedHat prerelease of gcc-3.0 and is not able to compile > kernel properly. Actually, the first gcc-2.96 weren't able to compile kernels properly, but the later ones (those shipped with RH 7.3, for example), are fine. > In addition I have recently seen gdb getting all wrong > when I used gcc-3.*. So try with gcc-2.95 first. Something else to check is whether UML and the module are compiled with the exact same compiler. If they aren't try that. > Note: If it's really a RedHat system, gcc-2.95 should exists under > a name `kgcc' there. Only on RH 7.1 (and maybe 7.2). It was removed on 7.3, and I don't think it exists on 8.0. -- Muli Ben-Yehuda http://www.mulix.org http://syscalltrack.sf.net |
From: Jan H. <bu...@uc...> - 2003-01-31 10:30:33
|
On Fri, Jan 31, 2003 at 12:25:12PM +0200, Muli Ben-Yehuda wrote: > On Fri, Jan 31, 2003 at 11:17:43AM +0100, Jan Hudec wrote: > > On Thu, Jan 30, 2003 at 03:51:44PM +0200, Avi Weit wrote: > > > Hi , > > > > > > I have a debuging problem using ddd (3.3.1) with UML 2.4.19-48 ( but also > > > with earlier releases , like UML 2.4.18-35 ) under host kernel of 2.4.19 > > > and 2.4.2-2 . Please note that ddd run on the host and not inside UML. > > > > > > Here is the senario: > > > > > > I have compiled UML and its modules (gcc 2.96) as written in the HowTo > > ^^^^ > > If this is not a typo, it's probablt the problem! No official gcc-2.96 > > exists. It's a RedHat prerelease of gcc-3.0 and is not able to compile > > kernel properly. > > Actually, the first gcc-2.96 weren't able to compile kernels properly, > but the later ones (those shipped with RH 7.3, for example), are > fine. It seems no gcc later that gcc-2.95 seems to compile umlinux in a way gdb would like. > > In addition I have recently seen gdb getting all wrong > > when I used gcc-3.*. So try with gcc-2.95 first. > > Something else to check is whether UML and the module are compiled > with the exact same compiler. If they aren't try that. > > > Note: If it's really a RedHat system, gcc-2.95 should exists under > > a name `kgcc' there. > > Only on RH 7.1 (and maybe 7.2). It was removed on 7.3, and I don't > think it exists on 8.0. Hm... and is there any other package with gcc-2.95? Like on Debian, which provides gcc 2.95, 3.0, 3.1 and 3.2 as separate packages that can be installed simultaneously. I recently found myself switching compiler quite often (due to one bug here, another there...) ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bu...@uc...> |
From: Steven P. <st...@si...> - 2003-01-31 15:48:31
|
On Fri, Jan 31, 2003 at 11:30:15AM +0100, Jan Hudec wrote: > It seems no gcc later that gcc-2.95 seems to compile umlinux in a way > gdb would like. Have you actually *tried* the gcc that comes with Red Hat 7.x? (Appropriately updated, of course.) If not, then I really wish you would stop making assumptions about it. That only serves to confuse users. While I haven't done any debugging on UML, I run production servers on UML compiled with Red Hat 7.3's gcc 2.96 with absolutely no problems. Back to the original question though... If you are trying to compile with an unpatched Red Hat 7.x (especially 7.0 and 7.1), then I suggest pulling down all the updates for gcc (and everything else, for that matter - running an unpatched box is insane :) from your favorite Red Hat mirror and trying again after you've installed them. Steve -- st...@si... | Southern Illinois Linux Users Group (618)398-7360 | See web site for meeting details. Steven Pritchard | http://www.silug.org/ |
From: Jan H. <bu...@uc...> - 2003-01-31 15:56:48
|
On Fri, Jan 31, 2003 at 09:48:07AM -0600, Steven Pritchard wrote: > On Fri, Jan 31, 2003 at 11:30:15AM +0100, Jan Hudec wrote: > > It seems no gcc later that gcc-2.95 seems to compile umlinux in a way > > gdb would like. > > Have you actually *tried* the gcc that comes with Red Hat 7.x? > (Appropriately updated, of course.) If not, then I really wish you > would stop making assumptions about it. That only serves to confuse > users. No, I have not run _that_ particular revision, but since I run several other versions and most of them caused strange debuging errors. Though none of them seemed to cause errors. Note that the statement you quoted does not say anything about RedHat. It speaks generaly of gcc other than 2.95 having troubles. > While I haven't done any debugging on UML, I run production servers on > UML compiled with Red Hat 7.3's gcc 2.96 with absolutely no problems. All the versions that I saw confuse debugger compile rock solid kernels. > Back to the original question though... If you are trying to compile > with an unpatched Red Hat 7.x (especially 7.0 and 7.1), then I suggest > pulling down all the updates for gcc (and everything else, for that > matter - running an unpatched box is insane :) from your favorite Red > Hat mirror and trying again after you've installed them. ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bu...@uc...> |
From: Jon S. <jon...@ya...> - 2003-01-31 17:34:39
|
> > In addition I have recently seen gdb getting all > wrong > > when I used gcc-3.*. So try with gcc-2.95 first. > Are you using gdb 5.3 with the gcc 3.* compilers? gdb 5.2 gets the backtrace wrong sometimes with gcc 3.2. ===== Jon Smirl jon...@ya... __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jan H. <bu...@uc...> - 2003-01-31 17:36:43
|
On Fri, Jan 31, 2003 at 09:34:38AM -0800, Jon Smirl wrote: > > > In addition I have recently seen gdb getting all > > wrong > > > when I used gcc-3.*. So try with gcc-2.95 first. > > > Are you using gdb 5.3 with the gcc 3.* compilers? gdb > 5.2 gets the backtrace wrong sometimes with gcc 3.2. Sure I do. $ gdb -v GNU gdb 5.3-debian ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bu...@uc...> |