Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] The list generated by "info sharedlibrary" gets truncated.

Hi Linda,

This is the "info sharedlibrary" output on Linux:

From        To          Syms Read   Shared Object Library
0x40018410  0x4001847c  Yes         /home/chanskw/dll/libanil.so
0x4003ffa0  0x40138a9b  Yes         /lib/i686/libc.so.6
0x401543b0  0x401543f0  Yes         /home/chanskw/dll/libdll2.so
0x40001db0  0x4001321c  Yes         /lib/ld-linux.so.2

As you notice, the output on Linux is significantly differently from those
on AIX.
Since GetGdbSharedLibraries::updateSharedLibraries()was targetted to
parse the output from Linux, you need need to modify this function to parse
the output
from AIX correctly.   As discussed in previous notes, we are going to
represent a module
with multiple start and end addresses.  So, you can store both the data
addresses and
text addresses in your module's address list.

Regarding your question about gdbPicl discarding the last line of "info
sharedlibrary" output,
same thing is happening on Linux.  i.e. /lib/ld-linux.so.2 also got
discarded in my case.
Therefore, I propose the following changes to
GetGdbSharedLibraries::updateSharedLibraries()
in GetGdbSharedLibraries.java.

Instead of doing this:

if(lines!=null && lines.length>0)
        lines[lines.length-1] = null; // remove trailing "(gdb)" prompt

I propose the following check to remove possilbe trailing "(gdb)":

if (lines!=null && lines.length>0)
     if (lines[lines.length-1].startsWith("(gdb)"))
          lines[lines.length-1] = null;

If you don't have any problem with this fix.  I am going to put the fix in
both the R1 and R2 stream.

Thanks for letting me know about this problem.

Regards,
Samantha Chan



Back to the top