This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: /proc/kcore_elf



  In message <199904011300.FAA06447@cygnus.com>you write:
  > Dear all,
  > 
  > We've found a problem when using egcs to compile the Linux kernel with
  > debugging information compiled in (using the "-g" flag). We're doing this s
  > o
  > that we can attach to it with gdb whilst it is running and browse various d
  > ata
  > structures.
  > 
  > We've found that the debugging information is invalid/incomplete in some
  > areas:
  > 
  > 	(gdb) p task
  > 	$1 = 0xc01f2000
  > 	(gdb) p task[0]
  > 	cannot subscript something of type `<data variable, no debug info>'
  > 
  > I've produced a kernel patch (attached) and it has been debugged by myself 
  > and others to add a new proc file ("/proc/kcore_elf") that gives the appearance
  > of an ELF core dump. This alleviates much of the problem we were having, thus
  > allowing the presence and addresses of all variables to be correctly
  > determined. However, the debugging information does not appear to correctly
  > record the type of all these variables. Note that in the above example, the
  > type of task[0] is actually present, and the variable can be cast to it and
  > have its contents successfully read.
The odds of someone applying the kernel patch, then building the kernel
with debug symbols and using /proc/kcore_elf to track this down are much
less than someone looking at a testcase you provide which indicates what
file and why the debug symbols are incorrect.

ie, the better the bug report you file, the more likely someone will look
at the problem.  The bug report you have filed is not very good as it is
missing key elements.

In fact, it's not even clear this is an egcs or a gdb problem.  Just because
it worked with gcc-2.7.2 does not necessarily mean it is an egcs problem. 

Sorry,

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]