help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to debug this strange load problem


From: frank wang
Subject: Re: how to debug this strange load problem
Date: Wed, 30 Aug 2006 12:20:44 -0700

It is time to give up. After spending so much time, I could not fix this problem. Here is summary what I have done.
 
1) By following John's suggestion, I tried to recompile the code with -ggdb3. It took about one day and finally it gave me the following errors: in attaced file result.txt
 
 
2)Without the success to recompile the code, I used gdb to debug the code with the original build. After stepping through the code, I found that by typing command in octave load test2.txt. Octave in load-save.cc could not find the correct format, so variable format = LS_UNKNOWN. Then Octave returns without read the data.
 
I tried to force format = LS_ASCII, octave can continue to do_load. The orig_fname contains
$54 = (const string &) @0xbfa64b84: {static npos = 4294967295,
  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8f7104c " test2.txt"}}
 
You can see the file name. Then, inside do_load, it go to read_ascii_data, the extract_name did not get the file name and the name is empty, so it prints:
 
load: empty name keyword or no data found in file `test2.txt'.
 
 
My  /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.8.
 
Thanks
 
Frank
 
On 8/29/06, John W. Eaton <address@hidden> wrote:
On 29-Aug-2006, frank wang wrote:

| Could you specify how to set the flag -ggdb3? Is this in makefile or
| configure?

You can use

./configure CXXFLAGS="-ggdb3"
make

| Also, how can I find the version of libstdc++  and libstdc++?

ldd full/path/to/octave

will show you something like

       ...
       libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00002ad07cb99000)
       libc.so.6 => /lib/libc.so.6 (0x00002ad07cd9b000)

Then

$ ls -l /usr/lib/libstdc++.so.6
lrwxrwxrwx 1 root root 18 Jul 12 13:11 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.8
$ ls -l /lib/libc.so.6
lrwxrwxrwx 1 root root 13 Jun 28 12:51 /lib/libc.so.6 -> libc-2.3.6.so

| After I build octave with -ggdb3, is this correct procedure to setup the
| debug process?
| 1) run gdb octave
| 2) inside gdb, set break point at the load function
| 3) inside gdb, run
|
| Could you tell me the file name containing load function source code?

The file is load-save.cc , the function is Fload (the F prefix is a
coding convention, enforced by the DEFUN macro).

BTW, if you do find that the problem is due to a bug in the compiler
or libraries, then we can't help you fix that other than to tell you
to install a newer/different version.  So maybe you should start by
installing the latest GCC?  4.1.0 was the first release in a series
and there has been a bug-fix release since.

jwe

Attachment: result.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]