Hello Xavier,
thanks for the reply. I tried to set the solib-search-path but with no
result. This seems to be more of an dylib error.
In the attachment you will find the log for the following command:
pyclewn --level=nbdebug --file=apple-gdb-log.txt -p /usr/bin/gdb
-a '--args hello'
In gvim I typed the following:
:Cmapkeys
Shift+R
Normally one would expect that the program starts but that doesn't happen.
My sample program is:
#include <iostream>
int main ()
{
std::cout << "Hello, world!\n";
return 0;
}
The program was compiled with:
/usr/bin/g++ -g hello.cpp -o hello
which uses the apple gcc 4.2 compiler.
I started the programm with the normal apple gdb without pyclewin.
Here everything worked like a charm.
Thanks for the help and cheers
Max
On 28 March 2011 16:57, Xavier de Gaye <[email protected]> wrote:
> On Mon, Mar 28, 2011 at 12:12 PM, Max Sagebaum wrote:
>>
>> The version of the gdb is GNU gdb 6.3.50-20050815 (Apple version
>> gdb-1472) which is maybe incompatible with pyclewn.
>> So I installed a newer gdb version from macports which is GNU gdb
>> (GDB) 7.2. Here a test applications works with pyclewn. But my own
>> application currently needs a DYLD_LIBRARY_PATH which is not
>> recognised by the gdb 7.2. So have to work with the apple gdb.
>>
>> Do you have any ideas what I could do that pyclewn works with the apple gdb.
>>
>
>
> Hello Max,
>
> When using GNU gdb 7.2, did you try setting 'solib-search-path' in gdb
> to the same paths used by your DYLD_LIBRARY_PATH ?
> 'solib-search-path' tells gdb where to look for the shared libraries
> symbols.
>
> It is not easy to port pyclewn to the changes made by Apple to gdb/MI,
> without an Apple system at hand. You could mail me the logfile with
> full trace level of the few commands that failed, just to get an idea
> of the amount of work required.
> Full trace level:
>
> pyclewn --level=nbdebug --file=logfile
>
> --
> Xavier
>
> Les Chemins de Lokoti: http://lokoti.alwaysdata.net
>
gdb INFO gdb version: 6.3.50
vim INFO platform: Darwin-10.7.0-i386-64bit
vim INFO Vim version: 703
vim INFO pyclewn.vim version: pyclewn-1.5
vim INFO sourcing the Vim script file:
/var/folders/Xj/XjPYYF2pGM0BUxzfiwwgtE+++TI/-Tmp-/vimscriptUzExYZ.clewn
vim INFO Vim argv list: ['/opt/local/bin/gvim', '-nb', '-S',
'/var/folders/Xj/XjPYYF2pGM0BUxzfiwwgtE+++TI/-Tmp-/vimscriptUzExYZ.clewn']
nb INFO connected to ('127.0.0.1', 58552)
nb NBDEBUG AUTH changeme
nb NBDEBUG 0:version=0 "2.5"
nb NBDEBUG 0:startupDone=0
vim INFO ready, netbeans version "2.5" (vim "netbeans remove function" bug:
"1", vim "netbeans getLength" bug: "1"), remote ('127.0.0.1', 58552)
vim INFO pyclewn version 1.5 and the Gdb debugger
nb NBDEBUG 0:fileOpened=0 "/User/maxsagebaum/gdb-test/(clewn)_console" T F
nb NBDEBUG 1:putBufferNumber!1 "/User/maxsagebaum/gdb-test/(clewn)_console"
nb NBDEBUG 1:stopDocumentListen!2
nb NBDEBUG 0:fileOpened=0 "/User/maxsagebaum/gdb-test/(clewn)_console" T F
nb NBDEBUG 1:putBufferNumber!3 "/User/maxsagebaum/gdb-test/(clewn)_console"
nb NBDEBUG 1:stopDocumentListen!4
nb NBDEBUG 0:fileOpened=0 "/User/maxsagebaum/gdb-test/(clewn)_console" T F
nb NBDEBUG 1:putBufferNumber!5 "/User/maxsagebaum/gdb-test/(clewn)_console"
nb NBDEBUG 1:stopDocumentListen!6
nb NBDEBUG 1:newDotAndMark=1 0 0
nb NBDEBUG 1:keyCommand=1 "ClewnBuffer.Console.open"
nb NBDEBUG 1:keyAtPos=1 "ClewnBuffer.Console.open" 0 1/0
nb NBDEBUG 1:editFile!7 "(clewn)_console"
nb NBDEBUG 1:setReadOnly!8 T
nb NBDEBUG 1:newDotAndMark=1 0 0
nb NBDEBUG 1:keyCommand=1 "mapkeys"
nb NBDEBUG 1:keyAtPos=1 "mapkeys" 0 1/0
nb NBDEBUG 0:startAtomic!9
nb NBDEBUG 1:setReadOnly!10 F
nb NBDEBUG 1:insert/11 0 "Pyclewn version 1.5 starting a new instance of
gdb.\n\n"
nb NBDEBUG 1:setDot!12 52
nb NBDEBUG 1:setReadOnly!13 T
nb NBDEBUG 0:endAtomic!14
posix INFO starting "gdb" with a pseudo tty
posix INFO program argv list: ['/usr/bin/gdb', '-tty=/dev/ttys000', '-x',
'/var/folders/Xj/XjPYYF2pGM0BUxzfiwwgtE+++TI/-Tmp-/gdbscriptUlv5kv.clewn',
'--interpreter=mi', '--args', 'hello']
nb NBDEBUG 0:specialKeys!15 "C-B"
nb NBDEBUG 0:specialKeys!16 "C-D"
nb NBDEBUG 0:specialKeys!17 "C-E"
nb NBDEBUG 0:specialKeys!18 "C-N"
nb NBDEBUG 0:specialKeys!19 "C-P"
nb NBDEBUG 0:specialKeys!20 "C-U"
nb NBDEBUG 0:specialKeys!21 "C-X"
nb NBDEBUG 0:specialKeys!22 "C-Z"
nb NBDEBUG 0:specialKeys!23 "S-A"
nb NBDEBUG 0:specialKeys!24 "S-B"
nb NBDEBUG 0:specialKeys!25 "S-C"
posix INFO terminal control with TIOCSCTTY ioctl call
nb NBDEBUG 0:specialKeys!26 "S-F"
nb NBDEBUG 0:specialKeys!27 "S-L"
nb NBDEBUG 0:specialKeys!28 "S-Q"
nb NBDEBUG 0:specialKeys!29 "S-R"
nb NBDEBUG 0:specialKeys!30 "S-S"
nb NBDEBUG 0:specialKeys!31 "S-W"
nb NBDEBUG 0:specialKeys!32 "S-X"
nb NBDEBUG 0:startAtomic!33
nb NBDEBUG 1:setReadOnly!34 F
nb NBDEBUG 1:insert/35 53 " C-B : break \"${fname}\":${lnum} # set
breakpoint at current line\n C-D : down\n C-E : clear \"${fname}\":${lnum} #
clear breakpoint at current line\n C-N : next\n C-P : print ${text}
# print value of selection at mouse position\n C-U : up\n C-X : print
*${text} # print value referenced by word at mouse position\n C-Z :
sigint # kill the inferior running program\n S-A : info
args\n S-B : info breakpoints\n S-C : continue\n S-F : finish\n S-L : info
locals\n S-Q : quit\n S-R : run\n S-S : step\n S-W : where\n S-X : foldvar
${lnum} # expand/collapse a watched variable\n"
nb NBDEBUG 1:setDot!36 671
nb NBDEBUG 1:setReadOnly!37 T
nb NBDEBUG 0:endAtomic!38
nb NBDEBUG 0:startAtomic!39
nb NBDEBUG 1:setReadOnly!40 F
nb NBDEBUG 1:insert/41 672 "(gdb) "
nb NBDEBUG 1:setDot!42 678
nb NBDEBUG 1:setReadOnly!43 T
nb NBDEBUG 0:endAtomic!44
nb NBDEBUG 1:newDotAndMark=7 0 0
nb NBDEBUG 1:keyCommand=7 "ClewnBuffer.Console.open"
nb NBDEBUG 1:keyAtPos=7 "ClewnBuffer.Console.open" 0 1/0
nb NBDEBUG 1:fileOpened=0 "/User/maxsagebaum/gdb-test/(clewn)_console" T F
nb NBDEBUG 11
nb NBDEBUG 35
nb NBDEBUG 41
gdb DEBUG ~"GNU gdb 6.3.50-20050815 (Apple version gdb-1472) (Wed Jul 21
10:53:12 UTC 2010)\n"
gdb DEBUG ~"Copyright 2004 Free Software Foundation, Inc.\n"
gdb DEBUG ~"GDB is free software, covered by the GNU General Public License,
and you are\n"
gdb DEBUG ~"welcome to change it and/or distribute copies of it under
certain conditions.\n"
gdb DEBUG ~"Type \"show copying\" to see the conditions.\n"
gdb DEBUG ~"There is absolutely no warranty for GDB. Type \"show warranty\"
for details.\n"
gdb DEBUG ~"This GDB was configured as \"x86_64-apple-darwin\"..."
gdb DEBUG ~"\n"
gdb DEBUG (gdb)
nb NBDEBUG 0:startAtomic!45
nb NBDEBUG 1:setReadOnly!46 F
nb NBDEBUG 1:insert/47 678 "GNU gdb 6.3.50-20050815 (Apple version gdb-1472)
(Wed Jul 21 10:53:12 UTC 2010)\nCopyright 2004 Free Software Foundation,
Inc.\nGDB is free software, covered by the GNU General Public License, and you
are\nwelcome to change it and/or distribute copies of it under certain
conditions.\nType \"show copying\" to see the conditions.\nThere is absolutely
no warranty for GDB. Type \"show warranty\" for details.\nThis GDB was
configured as \"x86_64-apple-darwin\"...\n(gdb) "
nb NBDEBUG 1:setDot!48 1136
nb NBDEBUG 1:setReadOnly!49 T
nb NBDEBUG 0:endAtomic!50
gdb INFO oob commands execution: 0.000943 second
nb NBDEBUG 47
nb NBDEBUG 1:newDotAndMark=50 1135 1135
nb NBDEBUG 1:keyCommand=50 "S-R"
nb NBDEBUG 1:keyAtPos=50 "S-R" 1135 28/5
gdb DEBUG 100-interpreter-exec console "run"
gdb DEBUG =rerun
gdb INFO rerun
gdb DEBUG
100^done,time={wallclock="0.00013",user="0.00007",system="0.00006",start="1301333057.414962",end="1301333057.415088"}
mi INFO
done,time={wallclock="0.00013",user="0.00007",system="0.00006",start="1301333057.414962",end="1301333057.415088"}
gdb DEBUG 101-file-list-exec-source-file
gdb DEBUG (gdb)
gdb DEBUG
101^done,line="1",file="hello.cpp",fullname="/User/maxsagebaum/gdb-test/hello.cpp",time={wallclock="0.00214",user="0.00172",system="0.00042",start="1301333057.415823",end="1301333057.417960"}
gdb DEBUG 102-var-update *
gdb DEBUG (gdb)
gdb DEBUG
102^done,changelist={},time={wallclock="0.00002",user="0.00001",system="0.00001",start="1301333057.418486",end="1301333057.418503"}
misc DEBUG not an iterable of key/value pairs:
"{wallclock="0.00002",user="0.00001",system="0.00001",start="1301333057.418486",end="1301333057.418503"}"
mi DEBUG no match for
"changelist={},time={wallclock="0.00002",user="0.00001",system="0.00001",start="1301333057.418486",end="1301333057.418503"}"
gdb DEBUG 103-file-list-exec-source-files
gdb DEBUG (gdb)
gdb DEBUG
103^done,files={{file="hello.cpp",fullname="/User/maxsagebaum/gdb-test/hello.cpp"},{file="stl_algobase.h",fullname="/usr/include/c++/4.2.1/bits/stl_algobase.h"},{file="iostream",fullname="/usr/include/c++/4.2.1/iostream"},{file="locale_facets.tcc",fullname="/usr/include/c++/4.2.1/bits/locale_facets.tcc"},{file="/usr/include/c++/4.2.1/iostream",fullname="/usr/include/c++/4.2.1/iostream"},{file="/usr/include/c++/4.2.1/bits/locale_facets.tcc",fullname="/usr/include/c++/4.2.1/bits/locale_facets.tcc"},{file="/usr/include/c++/4.2.1/bits/stl_algobase.h",fullname="/usr/include/c++/4.2.1/bits/stl_algobase.h"}},time={wallclock="0.00056",user="0.00032",system="0.00016",start="1301333057.419089",end="1301333057.419645"}
misc DEBUG not an iterable of key/value pairs:
"{wallclock="0.00056",user="0.00032",system="0.00016",start="1301333057.419089",end="1301333057.419645"}"
gdb DEBUG 104-break-list
gdb DEBUG (gdb)
gdb DEBUG
104^done,BreakpointTable={},time={wallclock="0.00003",user="0.00003",system="0.00000",start="1301333057.420292",end="1301333057.420324"}
misc DEBUG not an iterable of key/value pairs:
"{wallclock="0.00003",user="0.00003",system="0.00000",start="1301333057.420292",end="1301333057.420324"}"
mi DEBUG no match for
"BreakpointTable={},time={wallclock="0.00003",user="0.00003",system="0.00000",start="1301333057.420292",end="1301333057.420324"}"
nb NBDEBUG 0:startAtomic!51
nb NBDEBUG 1:setReadOnly!52 F
nb NBDEBUG 1:insert/53 1136 "run\n(gdb) "
nb NBDEBUG 1:setDot!54 1146
nb NBDEBUG 1:setReadOnly!55 T
nb NBDEBUG 0:endAtomic!56
gdb INFO oob commands execution: 0.006606 second
gdb DEBUG (gdb)
nb NBDEBUG 53
nb NBDEBUG 1:newDotAndMark=56 1145 1145
nb NBDEBUG 1:keyCommand=56 "ClewnBuffer.Console.close"
nb NBDEBUG 1:keyAtPos=56 "ClewnBuffer.Console.close" 1145 29/5
nb NBDEBUG 1:killed=56
nb INFO (clewn)_console length: 0 bytes
nb NBDEBUG 0:disconnect=56
nb INFO enter close
gdb DEBUG 105-interpreter-exec console ""
gdb DEBUG
105^done,time={wallclock="0.00002",user="0.00002",system="0.00001",start="1301333075.143561",end="1301333075.143584"}
mi INFO
done,time={wallclock="0.00002",user="0.00002",system="0.00001",start="1301333075.143561",end="1301333075.143584"}
gdb DEBUG 106-file-list-exec-source-file
gdb DEBUG (gdb)
gdb DEBUG
106^done,line="1",file="hello.cpp",fullname="/User/maxsagebaum/gdb-test/hello.cpp",time={wallclock="0.00006",user="0.00006",system="0.00000",start="1301333075.148444",end="1301333075.148508"}
gdb DEBUG 107-var-update *
gdb DEBUG (gdb)
gdb DEBUG
107^done,changelist={},time={wallclock="0.00001",user="0.00001",system="0.00000",start="1301333075.149167",end="1301333075.149177"}
misc DEBUG not an iterable of key/value pairs:
"{wallclock="0.00001",user="0.00001",system="0.00000",start="1301333075.149167",end="1301333075.149177"}"
mi DEBUG no match for
"changelist={},time={wallclock="0.00001",user="0.00001",system="0.00000",start="1301333075.149167",end="1301333075.149177"}"
gdb DEBUG 108-break-list
gdb DEBUG (gdb)
gdb DEBUG
108^done,BreakpointTable={},time={wallclock="0.00003",user="0.00003",system="0.00000",start="1301333075.149715",end="1301333075.149749"}
misc DEBUG not an iterable of key/value pairs:
"{wallclock="0.00003",user="0.00003",system="0.00000",start="1301333075.149715",end="1301333075.149749"}"
mi DEBUG no match for
"BreakpointTable={},time={wallclock="0.00003",user="0.00003",system="0.00000",start="1301333075.149715",end="1301333075.149749"}"
gdb DEBUG quit
gdb INFO oob commands execution: 0.002425 second
gdb DEBUG (gdb)
gdb DEBUG &"quit\n"
gdb INFO quit
dbg INFO enter close
dbg INFO in close: remove all annotations
vim DEBUG Vim instance:
options:
{'args': ['--args', 'hello'],
'background': None,
'cargs': None,
'daemon': False,
'editor': '/opt/local/bin/gvim',
'file': 'apple-gdb-log.txt',
'gdb': '',
'level': 5,
'maxlines': 10000,
'netbeans': None,
'noname_fix': '1',
'pdb': False,
'pgm': '/usr/bin/gdb',
'prefix': 'C',
'run': False,
'simple': False,
'tty': '/dev/null',
'window': 'top'}
netbeans:
{'_bset': {'(clewn)_console': {}, '(clewn)_dbgvar': {}},
'_fileno': None,
'_map': {},
'ac_in_buffer': '',
'accepting': False,
'addr': ('127.0.0.1', 58552),
'connected': False,
'console': <clewn.netbeans.Console object at 0x101135a10>,
'dbgvarbuf': <clewn.netbeans.DebuggerVarBuffer object at 0x101135e50>,
'debugger': <clewn.gdb.Gdb object at 0x101135210>,
'ibuff': [],
'incoming': [],
'last_buf': None,
'last_seqno': 53,
'nbversion': '2.5',
'passwd': 'changeme',
'producer_fifo': deque([]),
'ready': True,
'reply_fifo': <asynchat.fifo instance at 0x101137320>,
'seqno': 56,
'socket': <socket._socketobject object at 0x101109fa0>,
'terminator': '
'}
debugger Gdb:
{'_Debugger__nbsock': ready, netbeans version "2.5" (vim "netbeans remove
function" bug: "1", vim "netbeans getLength" bug: "1"), remote ('127.0.0.1',
58552),
'_consbuffered': False,
'_jobs': [(1301333075.1556039,
<bound method Gdb._newf of <clewn.gdb.Gdb object at 0x101135210>>),
(1301333075.1556199,
<bound method Gdb._newf of <clewn.gdb.Gdb object at 0x101135210>>)],
'_jobs_enabled': True,
'_last_balloon': '',
'_prompt_str': '(gdb) ',
'arglist': ['--args', 'hello'],
'argv': ['/usr/bin/gdb',
'-tty=/dev/ttys000',
'-x',
'/var/folders/Xj/XjPYYF2pGM0BUxzfiwwgtE+++TI/-Tmp-/gdbscriptUlv5kv.clewn',
'--interpreter=mi',
'--args',
'hello'],
'async': False,
'cli': <clewn.gdbmi.CliCommand object at 0x101135690>,
'closed': True,
'cmd_fifo': deque([]),
'curcmdline': 'run',
'debug': True,
'doprompt': False,
'fileasync': None,
'firstcmdline': '',
'foldlnum': None,
'gdb_busy': False,
'globaal': <clewn.gdb.GlobalSetup object at 0x1011350d0>,
'info': {'_root_varobj': VarObjList(),
'args': [],
'bp_dictionary': {},
'breakpoints': [],
'changelist': [],
'cwd': [],
'debuggee': [],
'directories': ['$cdir', '$cwd'],
'file': {'file': 'hello.cpp',
'fullname': '/User/maxsagebaum/gdb-test/hello.cpp',
'line': '1'},
'frame': {},
'frameloc': {},
'gdb': <clewn.gdb.Gdb object at 0x101135210>,
'sources': [{'file': 'hello.cpp',
'fullname': '/User/maxsagebaum/gdb-test/hello.cpp'},
{'file': 'stl_algobase.h',
'fullname': '/usr/include/c++/4.2.1/bits/stl_algobase.h'},
{'file': 'iostream',
'fullname': '/usr/include/c++/4.2.1/iostream'},
{'file': 'locale_facets.tcc',
'fullname': '/usr/include/c++/4.2.1/bits/locale_facets.tcc'},
{'file': '/usr/include/c++/4.2.1/iostream',
'fullname': '/usr/include/c++/4.2.1/iostream'},
{'file': '/usr/include/c++/4.2.1/bits/locale_facets.tcc',
'fullname': '/usr/include/c++/4.2.1/bits/locale_facets.tcc'},
{'file': '/usr/include/c++/4.2.1/bits/stl_algobase.h',
'fullname': '/usr/include/c++/4.2.1/bits/stl_algobase.h'}],
'varobj': <clewn.gdbmi.RootVarObj object at 0x1011353d0>},
'lastcmd': None,
'multiple_choice': 0,
'oob': None,
'oob_list': <clewn.gdbmi.OobList object at 0x101135450>,
'options': <Values at 0x1011363b0: {'tty': '/dev/null', 'args': ['--args',
'hello'], 'run': False, 'file': 'apple-gdb-log.txt', 'netbeans': None, 'level':
5, 'simple': False, 'pgm': '/usr/bin/gdb', 'daemon': False, 'noname_fix': '1',
'maxlines': 10000, 'cargs': None, 'prefix': 'C', 'window': 'top', 'editor':
'/opt/local/bin/gvim', 'background': None, 'pdb': False, 'gdb': ''}>,
'pgm': '/usr/bin/gdb',
'pgm_name': 'gdb',
'pid': 0,
'project': '',
'results': {},
'sig_handler': 0,
'started': False,
'state': 2,
'stream_record': [],
'time': None,
'token': '108',
'ttyname': '/dev/ttys003',
'version': '6.3.50'}
vim INFO pyclewn exiting
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and publish
your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Pyclewn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyclewn-general