From sxcxx at yahoo.com Tue Jul 13 13:50:19 2010 From: sxcxx at yahoo.com (ying chen) Date: Sat Dec 17 12:03:05 2011 Subject: [Klone-users] If anyone got this email, please respond! Thanks! Message-ID: <849573.85390.qm@web112613.mail.gq1.yahoo.com> From sxcxx at yahoo.com Tue Jul 13 14:00:09 2010 From: sxcxx at yahoo.com (ying chen) Date: Sat Dec 17 12:03:05 2011 Subject: [Klone-users] debugging problem Message-ID: <381886.86242.qm@web112607.mail.gq1.yahoo.com> Hi, I am currently evaluating the klone web server for our product and having problem to debug the web pages. I tried to debug klone on a linux machine. I put the debug hook as guided in wiki, then added ?--enable_debug? in the Makefile ( KLONE_CONF_ARGS = --enable_debug), and then ?make?. But it seems not working. Did I miss sth? One thing I found strange is that the executable(kloned) created have the same size with or without this "--enable_debug" flag. Here is the snapshot of what I got when I use gdb to debug $ gdb GNU gdb 6.6-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-linux-gnu". (gdb) file kloned Reading symbols from /home/anathoo/ychen/klone/klone-2.0.0/build/target/klone-co re-2.0.0/src/kloned/kloned...done. Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (gdb) set args -Fd (gdb) b this_pg_debug Breakpoint 1 at 0x8051783 (gdb) r Starting program: /home/anathoo/ychen/klone/klone-2.0.0/build/target/klone-core- 2.0.0/src/kloned/kloned -Fd server_list: app_http allow_root: yes log: type: syslog syslog: facility: LOG_LOCAL0 app_http: type: http addr: type: IPv4 port: 8080 dir_root: /www Program exited with code 01. (gdb) Thanks, Ying From tho at koanlogic.com Tue Jul 13 22:32:57 2010 From: tho at koanlogic.com (tho) Date: Sat Dec 17 12:03:05 2011 Subject: [Klone-users] debugging problem In-Reply-To: <381886.86242.qm@web112607.mail.gq1.yahoo.com> References: <381886.86242.qm@web112607.mail.gq1.yahoo.com> Message-ID: Hi Ying, On Jul 13, 2010, at 8:00 PM, ying chen wrote: > Here is the snapshot of what I got when I use gdb to debug > > $ gdb > > Program exited with code 01. it seems that kloned process is bailing out somewhere in its early stages. Take a look at the syslog file where LOG_LOCAL0 messages are redirected to see if you get hint about the exit cause -- that could be a simple "address already in use" if you have another process listening on tcp/8080. Otherwise you can place a breakpoint at app_run and "step" (or "next") to catch the exact position where the process exit's. Let us know, t. From sxcxx at yahoo.com Wed Jul 14 10:44:28 2010 From: sxcxx at yahoo.com (ying chen) Date: Sat Dec 17 12:03:05 2011 Subject: [Klone-users] debugging problem In-Reply-To: Message-ID: <412367.56119.qm@web112613.mail.gq1.yahoo.com> Hi Tho, Thank you very much for your reply. I changed the port number to 8088 and it does not kick me out anymore. But I still can't debug normally. It did stop at the breakpoint, but didn't give me the debug info that I needed (It seems to me that the symbol table is not created properly). I tried add/remove "--enable_debug" flag and that makes no difference. This is my testing page "first.kl1": <%! #include #include #include #include /* debug bookmark */ void this_pg_debug(void) { dbg("this_pg.kl1"); } %> My first page <% int i = 0; DIR *dirp; struct dirent *dp; /* debug hook */ this_pg_debug(); dirp = opendir("/"); while ((dp = readdir(dirp)) != NULL){ io_printf(out, "
  • %s
  • ", dp->d_name); i++; } closedir(dirp); io_printf(out, "
    total: %d", i); %> And here is the snapshot of the debugging process: $ gdb GNU gdb 6.6-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-linux-gnu". (gdb) file kloned Reading symbols from /home/anathoo/ychen/klone/klone-2.0.0/build/target/klone-co re-2.0.0/src/kloned/kloned...done. Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (gdb) set args -Fd (gdb) b this_pg_debug Breakpoint 1 at 0x8051783 (gdb) r Starting program: /home/anathoo/ychen/klone/klone-2.0.0/build/target/klone-core- 2.0.0/src/kloned/kloned -Fd server_list: app_http allow_root: yes log: type: syslog syslog: facility: LOG_LOCAL0 app_http: type: http addr: type: IPv4 port: 8088 dir_root: /www Breakpoint 1, 0x08051783 in this_pg_debug () (gdb) print i No symbol "i" in current context. (gdb) n Single stepping until exit from function this_pg_debug, which has no line number information. 0x08051831 in exec_page () (gdb) list 1 init.c: No such file or directory. in init.c (gdb) Thanks, Ying --- On Wed, 7/14/10, tho wrote: > From: tho > Subject: Re: [Klone-users] debugging problem > To: "Klone users" > Received: Wednesday, July 14, 2010, 10:32 AM > Hi Ying, > > On Jul 13, 2010, at 8:00 PM, ying chen wrote: > > Here is the snapshot of what I got when I use gdb to > debug > > > > $ gdb > > > > Program exited with code 01. > > it seems that kloned process is bailing out somewhere in > its early stages. > > Take a look at the syslog file where LOG_LOCAL0 messages > are redirected to see if you get hint about the exit cause > -- that could be a simple "address already in use" if you > have another process listening on tcp/8080. > > Otherwise you can place a breakpoint at app_run and "step" > (or "next") to catch the exact position where the process > exit's. > > Let us know, t. > _______________________________________________ > Klone-users mailing list > Klone-users@koanlogic.com > http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users > From tho at koanlogic.com Wed Jul 14 11:49:50 2010 From: tho at koanlogic.com (tho) Date: Sat Dec 17 12:03:05 2011 Subject: [Klone-users] debugging problem In-Reply-To: <412367.56119.qm@web112613.mail.gq1.yahoo.com> References: <412367.56119.qm@web112613.mail.gq1.yahoo.com> Message-ID: Hi Ying, On Jul 14, 2010, at 4:44 PM, ying chen wrote: > Hi Tho, > Breakpoint 1, 0x08051783 in this_pg_debug () > (gdb) print i > No symbol "i" in current context. The debugger is right: 'i' is not visible from this_pg_debug(), which is one stack frame lower than exec_page() -- i.e. where 'i' is declared and visible. > (gdb) n > Single stepping until exit from function this_pg_debug, > which has no line number information. > 0x08051831 in exec_page () Here you could issue a "print i" and expect some result from gdb. As a curiosity, is there any compatibility reason for using version 2.0.0 instead of current (2.2.1) ? ciao, t. From sxcxx at yahoo.com Wed Jul 14 12:07:16 2010 From: sxcxx at yahoo.com (ying chen) Date: Sat Dec 17 12:03:05 2011 Subject: [Klone-users] debugging problem In-Reply-To: Message-ID: <218979.16018.qm@web112606.mail.gq1.yahoo.com> Thanks, Tho! I tried that too, didn't work. And why "list" does not work either? And "no line number information"? Breakpoint 1, 0x08051783 in this_pg_debug () (gdb) n Single stepping until exit from function this_pg_debug, which has no line number information. 0x08051831 in exec_page () (gdb) print i No symbol "i" in current context. (gdb) list 1 init.c: No such file or directory. in init.c Thanks, Ying --- On Wed, 7/14/10, tho wrote: > From: tho > Subject: Re: [Klone-users] debugging problem > To: "Klone users" > Received: Wednesday, July 14, 2010, 11:49 PM > Hi Ying, > > On Jul 14, 2010, at 4:44 PM, ying chen wrote: > > Hi Tho, > > Breakpoint 1, 0x08051783 in this_pg_debug () > > (gdb) print i > > No symbol "i" in current context. > > The debugger is right: 'i' is not visible from > this_pg_debug(), which is one stack frame lower than > exec_page() -- i.e. where 'i' is declared and visible. > > > (gdb) n > > Single stepping until exit from function > this_pg_debug, > > which has no line number information. > > 0x08051831 in exec_page () > > Here you could issue a "print i" and expect some result > from gdb. > > > As a curiosity, is there any compatibility reason for using > version 2.0.0 instead of current (2.2.1) ? > > ciao, t. > _______________________________________________ > Klone-users mailing list > Klone-users@koanlogic.com > http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users > From tho at koanlogic.com Wed Jul 14 23:13:29 2010 From: tho at koanlogic.com (tho) Date: Sat Dec 17 12:03:05 2011 Subject: [Klone-users] debugging problem In-Reply-To: <218979.16018.qm@web112606.mail.gq1.yahoo.com> References: <218979.16018.qm@web112606.mail.gq1.yahoo.com> Message-ID: Hi Ying, On Jul 14, 2010, at 6:07 PM, ying chen wrote: > I tried that too, didn't work. And why "list" does not work either? And "no line number information"? > > > Breakpoint 1, 0x08051783 in this_pg_debug () > (gdb) n > Single stepping until exit from function this_pg_debug, > which has no line number information. > 0x08051831 in exec_page () > (gdb) print i > No symbol "i" in current context. > (gdb) list > 1 init.c: No such file or directory. > in init.c could you please try using the following Makefile: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- KLONE_VERSION = 2.2.1 KLONE_CONF_ARGS = --enable_debug WEBAPP_DIR = $(CURDIR)/webapp include klapp.mk klapp.mk: ; wget -O $@ http://koanlogic.com/klone/klapp.mk =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- and push a gdb breakpoint at pagefirst_kl1 (i.e. you can avoid this_pg_debug() altogether because klone>2.0.0 sets the debug hook automatically). ciao, t. From sxcxx at yahoo.com Thu Jul 15 11:37:02 2010 From: sxcxx at yahoo.com (ying chen) Date: Sat Dec 17 12:03:05 2011 Subject: [Klone-users] debugging problem In-Reply-To: Message-ID: <247081.70786.qm@web112603.mail.gq1.yahoo.com> Hi Tho, I tried 2.2.1, and the debugging is working on my Linux machine! Thank you! But my ultimate goal is to run klone on a target running qnx. I modified the Makefile you gave me to add "MAKL_PLATFORM = qnx-ppcbe" and got lots of compilation errors. Version 2.0.1pre4 works OK with qnx(but having debugging problems). I also tried the other debugging method (using syslog and dbg()) with Version 2.0.1pre4 and qnx. All I got in my syslog is the following(no debugging info): Jul 14 17:54:48 nto : [wrn][6328357:broker.c:105:broker_create] CGI support disabled, use --enable_cgi to enable it Jul 14 17:54:48 nto : [wrn][6328357:broker.c:112:broker_create] File system support disabled, use --enable_fs to enable it Is there a version that both supports qnx and has no debugging problems? Thanks, Ying --- On Thu, 7/15/10, tho wrote: > From: tho > Subject: Re: [Klone-users] debugging problem > To: "Klone users" > Received: Thursday, July 15, 2010, 11:13 AM > Hi Ying, > > On Jul 14, 2010, at 6:07 PM, ying chen wrote: > > I tried that too, didn't work. And why "list" does not > work either? And "no line number information"? > > > > > > Breakpoint 1, 0x08051783 in this_pg_debug () > > (gdb) n > > Single stepping until exit from function > this_pg_debug, > > which has no line number information. > > 0x08051831 in exec_page () > > (gdb) print i > > No symbol "i" in current context. > > (gdb) list > > 1? ? ???init.c: No such file > or directory. > >? ? ? ? in init.c > > > could you please try using the following Makefile: > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > KLONE_VERSION = 2.2.1 > > KLONE_CONF_ARGS = --enable_debug > > WEBAPP_DIR = $(CURDIR)/webapp > > include klapp.mk > > klapp.mk: ; wget -O $@ http://koanlogic.com/klone/klapp.mk > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > and push a gdb breakpoint at pagefirst_kl1 (i.e. you can > avoid this_pg_debug() altogether because klone>2.0.0 sets > the debug hook automatically). > > ciao, t. > _______________________________________________ > Klone-users mailing list > Klone-users@koanlogic.com > http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users > From tho at koanlogic.com Thu Jul 15 11:45:44 2010 From: tho at koanlogic.com (tho) Date: Sat Dec 17 12:03:05 2011 Subject: [Klone-users] debugging problem In-Reply-To: <247081.70786.qm@web112603.mail.gq1.yahoo.com> References: <247081.70786.qm@web112603.mail.gq1.yahoo.com> Message-ID: On Jul 15, 2010, at 5:37 PM, ying chen wrote: > I tried 2.2.1, and the debugging is working on my Linux machine! Thank you! > > But my ultimate goal is to run klone on a target running qnx. I modified the Makefile you gave me to add "MAKL_PLATFORM = qnx-ppcbe" and got lots of compilation errors. Version 2.0.1pre4 works OK with qnx(but having debugging problems). > > I also tried the other debugging method (using syslog and dbg()) with Version 2.0.1pre4 and qnx. All I got in my syslog is the following(no debugging info): > > Jul 14 17:54:48 nto : [wrn][6328357:broker.c:105:broker_create] CGI support disabled, use --enable_cgi to enable it > Jul 14 17:54:48 nto : [wrn][6328357:broker.c:112:broker_create] File system support disabled, use --enable_fs to enable it > > Is there a version that both supports qnx and has no debugging problems? Sorry Ying, in these very days we are completely restructuring our test environment, so I have no way to test the QNX build environment. Do you have any box that I can access to try fixing the 2.2.1 problems ? ciao, t. From sxcxx at yahoo.com Thu Jul 15 12:53:32 2010 From: sxcxx at yahoo.com (ying chen) Date: Sat Dec 17 12:03:05 2011 Subject: [Klone-users] debugging problem In-Reply-To: Message-ID: <488448.5364.qm@web112605.mail.gq1.yahoo.com> Thanks, Tho! I will let you know once I have the box setup. Regards, Ying --- On Thu, 7/15/10, tho wrote: > From: tho > Subject: Re: [Klone-users] debugging problem > To: "Klone users" > Received: Thursday, July 15, 2010, 11:45 PM > > On Jul 15, 2010, at 5:37 PM, ying chen wrote: > > I tried 2.2.1, and the debugging is working on my > Linux machine! Thank you! > > > > But my ultimate goal is to run klone on a target > running qnx. I modified the Makefile you gave me to add > "MAKL_PLATFORM = qnx-ppcbe" and got lots of compilation > errors. Version 2.0.1pre4 works OK with qnx(but having > debugging problems). > > > > I also tried the other debugging method (using syslog > and dbg()) with Version 2.0.1pre4 and qnx. All I got in my > syslog is the following(no debugging info): > > > > Jul 14 17:54:48 nto : > [wrn][6328357:broker.c:105:broker_create] CGI support > disabled, use --enable_cgi to enable it > > Jul 14 17:54:48 nto : > [wrn][6328357:broker.c:112:broker_create] File system > support disabled, use --enable_fs to enable it > > > > Is there a version that both supports qnx and has no > debugging problems? > > Sorry Ying, in these very days we are completely > restructuring our test environment, so I have no way to test > the QNX build environment.? > Do you have any box that I can access to try fixing the > 2.2.1 problems ? > > ciao, t. > _______________________________________________ > Klone-users mailing list > Klone-users@koanlogic.com > http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users > From spell_gooder_now at spellingbeewinnars.org Mon Jul 19 20:21:51 2010 From: spell_gooder_now at spellingbeewinnars.org (Patrick) Date: Sat Dec 17 12:03:05 2011 Subject: [Klone-users] Klone as Daemon? Message-ID: <4C44EC1F.8080100@spellingbeewinnars.org> Does anyone think it would be sensible to use Klone as a Daemon to provide services on a PC? Similar to CUPS for printing? I have a special interface used for GPIB and I would like to share it between processes, languages and possibly other computers in format that would have easy library support. Any thoughts? Thanks for reading-Patrick From spell_gooder_now at spellingbeewinnars.org Mon Jul 19 22:02:09 2010 From: spell_gooder_now at spellingbeewinnars.org (Patrick) Date: Sat Dec 17 12:03:05 2011 Subject: [Klone-users] Klone as Hardware Daemon? In-Reply-To: <4C44EC1F.8080100@spellingbeewinnars.org> References: <4C44EC1F.8080100@spellingbeewinnars.org> Message-ID: <4C4503A1.8010709@spellingbeewinnars.org> Sorry for the low quality posting everyone. I meant to say, would Klone be good for a hardware Daemon? I don't understand the underlying C well enough yet to know how hard it would be to add features for hardware access. I realize that it is already an http Daemon-Patrick From tho at koanlogic.com Tue Jul 20 04:07:49 2010 From: tho at koanlogic.com (tho) Date: Sat Dec 17 12:03:06 2011 Subject: [Klone-users] Klone as Daemon? In-Reply-To: <4C44EC1F.8080100@spellingbeewinnars.org> References: <4C44EC1F.8080100@spellingbeewinnars.org> Message-ID: <7E7EE7F0-946C-4B0F-97EB-8750C9A99A3D@koanlogic.com> Hi Patrick, On Jul 20, 2010, at 2:21 AM, Patrick wrote: > Does anyone think it would be sensible to use Klone as a Daemon to provide services on a PC? Similar to CUPS for printing? I have a special interface used for GPIB and I would like to share it between processes, languages and possibly other computers in format that would have easy library support. > > Any thoughts? I've no GPIB experience, so I'm not the most qualified person to give a sensible advice, anyway, it sounds like a good idea :) Has GPIB any standard hi-level API ? In such case you could start from a simple RPC-style HTTP mapping. ciao, t. From sxcxx at yahoo.com Tue Jul 13 13:50:19 2010 From: sxcxx at yahoo.com (ying chen) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] If anyone got this email, please respond! Thanks! Message-ID: <849573.85390.qm@web112613.mail.gq1.yahoo.com> From sxcxx at yahoo.com Tue Jul 13 14:00:09 2010 From: sxcxx at yahoo.com (ying chen) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] debugging problem Message-ID: <381886.86242.qm@web112607.mail.gq1.yahoo.com> Hi, I am currently evaluating the klone web server for our product and having problem to debug the web pages. I tried to debug klone on a linux machine. I put the debug hook as guided in wiki, then added ?--enable_debug? in the Makefile ( KLONE_CONF_ARGS = --enable_debug), and then ?make?. But it seems not working. Did I miss sth? One thing I found strange is that the executable(kloned) created have the same size with or without this "--enable_debug" flag. Here is the snapshot of what I got when I use gdb to debug $ gdb GNU gdb 6.6-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-linux-gnu". (gdb) file kloned Reading symbols from /home/anathoo/ychen/klone/klone-2.0.0/build/target/klone-co re-2.0.0/src/kloned/kloned...done. Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (gdb) set args -Fd (gdb) b this_pg_debug Breakpoint 1 at 0x8051783 (gdb) r Starting program: /home/anathoo/ychen/klone/klone-2.0.0/build/target/klone-core- 2.0.0/src/kloned/kloned -Fd server_list: app_http allow_root: yes log: type: syslog syslog: facility: LOG_LOCAL0 app_http: type: http addr: type: IPv4 port: 8080 dir_root: /www Program exited with code 01. (gdb) Thanks, Ying From tho at koanlogic.com Tue Jul 13 22:32:57 2010 From: tho at koanlogic.com (tho) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] debugging problem In-Reply-To: <381886.86242.qm@web112607.mail.gq1.yahoo.com> References: <381886.86242.qm@web112607.mail.gq1.yahoo.com> Message-ID: Hi Ying, On Jul 13, 2010, at 8:00 PM, ying chen wrote: > Here is the snapshot of what I got when I use gdb to debug > > $ gdb > > Program exited with code 01. it seems that kloned process is bailing out somewhere in its early stages. Take a look at the syslog file where LOG_LOCAL0 messages are redirected to see if you get hint about the exit cause -- that could be a simple "address already in use" if you have another process listening on tcp/8080. Otherwise you can place a breakpoint at app_run and "step" (or "next") to catch the exact position where the process exit's. Let us know, t. From sxcxx at yahoo.com Wed Jul 14 10:44:28 2010 From: sxcxx at yahoo.com (ying chen) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] debugging problem In-Reply-To: Message-ID: <412367.56119.qm@web112613.mail.gq1.yahoo.com> Hi Tho, Thank you very much for your reply. I changed the port number to 8088 and it does not kick me out anymore. But I still can't debug normally. It did stop at the breakpoint, but didn't give me the debug info that I needed (It seems to me that the symbol table is not created properly). I tried add/remove "--enable_debug" flag and that makes no difference. This is my testing page "first.kl1": <%! #include #include #include #include /* debug bookmark */ void this_pg_debug(void) { dbg("this_pg.kl1"); } %> My first page <% int i = 0; DIR *dirp; struct dirent *dp; /* debug hook */ this_pg_debug(); dirp = opendir("/"); while ((dp = readdir(dirp)) != NULL){ io_printf(out, "
  • %s
  • ", dp->d_name); i++; } closedir(dirp); io_printf(out, "
    total: %d", i); %> And here is the snapshot of the debugging process: $ gdb GNU gdb 6.6-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-linux-gnu". (gdb) file kloned Reading symbols from /home/anathoo/ychen/klone/klone-2.0.0/build/target/klone-co re-2.0.0/src/kloned/kloned...done. Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (gdb) set args -Fd (gdb) b this_pg_debug Breakpoint 1 at 0x8051783 (gdb) r Starting program: /home/anathoo/ychen/klone/klone-2.0.0/build/target/klone-core- 2.0.0/src/kloned/kloned -Fd server_list: app_http allow_root: yes log: type: syslog syslog: facility: LOG_LOCAL0 app_http: type: http addr: type: IPv4 port: 8088 dir_root: /www Breakpoint 1, 0x08051783 in this_pg_debug () (gdb) print i No symbol "i" in current context. (gdb) n Single stepping until exit from function this_pg_debug, which has no line number information. 0x08051831 in exec_page () (gdb) list 1 init.c: No such file or directory. in init.c (gdb) Thanks, Ying --- On Wed, 7/14/10, tho wrote: > From: tho > Subject: Re: [Klone-users] debugging problem > To: "Klone users" > Received: Wednesday, July 14, 2010, 10:32 AM > Hi Ying, > > On Jul 13, 2010, at 8:00 PM, ying chen wrote: > > Here is the snapshot of what I got when I use gdb to > debug > > > > $ gdb > > > > Program exited with code 01. > > it seems that kloned process is bailing out somewhere in > its early stages. > > Take a look at the syslog file where LOG_LOCAL0 messages > are redirected to see if you get hint about the exit cause > -- that could be a simple "address already in use" if you > have another process listening on tcp/8080. > > Otherwise you can place a breakpoint at app_run and "step" > (or "next") to catch the exact position where the process > exit's. > > Let us know, t. > _______________________________________________ > Klone-users mailing list > Klone-users@koanlogic.com > http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users > From tho at koanlogic.com Wed Jul 14 11:49:50 2010 From: tho at koanlogic.com (tho) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] debugging problem In-Reply-To: <412367.56119.qm@web112613.mail.gq1.yahoo.com> References: <412367.56119.qm@web112613.mail.gq1.yahoo.com> Message-ID: Hi Ying, On Jul 14, 2010, at 4:44 PM, ying chen wrote: > Hi Tho, > Breakpoint 1, 0x08051783 in this_pg_debug () > (gdb) print i > No symbol "i" in current context. The debugger is right: 'i' is not visible from this_pg_debug(), which is one stack frame lower than exec_page() -- i.e. where 'i' is declared and visible. > (gdb) n > Single stepping until exit from function this_pg_debug, > which has no line number information. > 0x08051831 in exec_page () Here you could issue a "print i" and expect some result from gdb. As a curiosity, is there any compatibility reason for using version 2.0.0 instead of current (2.2.1) ? ciao, t. From sxcxx at yahoo.com Wed Jul 14 12:07:16 2010 From: sxcxx at yahoo.com (ying chen) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] debugging problem In-Reply-To: Message-ID: <218979.16018.qm@web112606.mail.gq1.yahoo.com> Thanks, Tho! I tried that too, didn't work. And why "list" does not work either? And "no line number information"? Breakpoint 1, 0x08051783 in this_pg_debug () (gdb) n Single stepping until exit from function this_pg_debug, which has no line number information. 0x08051831 in exec_page () (gdb) print i No symbol "i" in current context. (gdb) list 1 init.c: No such file or directory. in init.c Thanks, Ying --- On Wed, 7/14/10, tho wrote: > From: tho > Subject: Re: [Klone-users] debugging problem > To: "Klone users" > Received: Wednesday, July 14, 2010, 11:49 PM > Hi Ying, > > On Jul 14, 2010, at 4:44 PM, ying chen wrote: > > Hi Tho, > > Breakpoint 1, 0x08051783 in this_pg_debug () > > (gdb) print i > > No symbol "i" in current context. > > The debugger is right: 'i' is not visible from > this_pg_debug(), which is one stack frame lower than > exec_page() -- i.e. where 'i' is declared and visible. > > > (gdb) n > > Single stepping until exit from function > this_pg_debug, > > which has no line number information. > > 0x08051831 in exec_page () > > Here you could issue a "print i" and expect some result > from gdb. > > > As a curiosity, is there any compatibility reason for using > version 2.0.0 instead of current (2.2.1) ? > > ciao, t. > _______________________________________________ > Klone-users mailing list > Klone-users@koanlogic.com > http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users > From tho at koanlogic.com Wed Jul 14 23:13:29 2010 From: tho at koanlogic.com (tho) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] debugging problem In-Reply-To: <218979.16018.qm@web112606.mail.gq1.yahoo.com> References: <218979.16018.qm@web112606.mail.gq1.yahoo.com> Message-ID: Hi Ying, On Jul 14, 2010, at 6:07 PM, ying chen wrote: > I tried that too, didn't work. And why "list" does not work either? And "no line number information"? > > > Breakpoint 1, 0x08051783 in this_pg_debug () > (gdb) n > Single stepping until exit from function this_pg_debug, > which has no line number information. > 0x08051831 in exec_page () > (gdb) print i > No symbol "i" in current context. > (gdb) list > 1 init.c: No such file or directory. > in init.c could you please try using the following Makefile: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- KLONE_VERSION = 2.2.1 KLONE_CONF_ARGS = --enable_debug WEBAPP_DIR = $(CURDIR)/webapp include klapp.mk klapp.mk: ; wget -O $@ http://koanlogic.com/klone/klapp.mk =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- and push a gdb breakpoint at pagefirst_kl1 (i.e. you can avoid this_pg_debug() altogether because klone>2.0.0 sets the debug hook automatically). ciao, t. From sxcxx at yahoo.com Thu Jul 15 11:37:02 2010 From: sxcxx at yahoo.com (ying chen) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] debugging problem In-Reply-To: Message-ID: <247081.70786.qm@web112603.mail.gq1.yahoo.com> Hi Tho, I tried 2.2.1, and the debugging is working on my Linux machine! Thank you! But my ultimate goal is to run klone on a target running qnx. I modified the Makefile you gave me to add "MAKL_PLATFORM = qnx-ppcbe" and got lots of compilation errors. Version 2.0.1pre4 works OK with qnx(but having debugging problems). I also tried the other debugging method (using syslog and dbg()) with Version 2.0.1pre4 and qnx. All I got in my syslog is the following(no debugging info): Jul 14 17:54:48 nto : [wrn][6328357:broker.c:105:broker_create] CGI support disabled, use --enable_cgi to enable it Jul 14 17:54:48 nto : [wrn][6328357:broker.c:112:broker_create] File system support disabled, use --enable_fs to enable it Is there a version that both supports qnx and has no debugging problems? Thanks, Ying --- On Thu, 7/15/10, tho wrote: > From: tho > Subject: Re: [Klone-users] debugging problem > To: "Klone users" > Received: Thursday, July 15, 2010, 11:13 AM > Hi Ying, > > On Jul 14, 2010, at 6:07 PM, ying chen wrote: > > I tried that too, didn't work. And why "list" does not > work either? And "no line number information"? > > > > > > Breakpoint 1, 0x08051783 in this_pg_debug () > > (gdb) n > > Single stepping until exit from function > this_pg_debug, > > which has no line number information. > > 0x08051831 in exec_page () > > (gdb) print i > > No symbol "i" in current context. > > (gdb) list > > 1? ? ???init.c: No such file > or directory. > >? ? ? ? in init.c > > > could you please try using the following Makefile: > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > KLONE_VERSION = 2.2.1 > > KLONE_CONF_ARGS = --enable_debug > > WEBAPP_DIR = $(CURDIR)/webapp > > include klapp.mk > > klapp.mk: ; wget -O $@ http://koanlogic.com/klone/klapp.mk > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > and push a gdb breakpoint at pagefirst_kl1 (i.e. you can > avoid this_pg_debug() altogether because klone>2.0.0 sets > the debug hook automatically). > > ciao, t. > _______________________________________________ > Klone-users mailing list > Klone-users@koanlogic.com > http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users > From tho at koanlogic.com Thu Jul 15 11:45:44 2010 From: tho at koanlogic.com (tho) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] debugging problem In-Reply-To: <247081.70786.qm@web112603.mail.gq1.yahoo.com> References: <247081.70786.qm@web112603.mail.gq1.yahoo.com> Message-ID: On Jul 15, 2010, at 5:37 PM, ying chen wrote: > I tried 2.2.1, and the debugging is working on my Linux machine! Thank you! > > But my ultimate goal is to run klone on a target running qnx. I modified the Makefile you gave me to add "MAKL_PLATFORM = qnx-ppcbe" and got lots of compilation errors. Version 2.0.1pre4 works OK with qnx(but having debugging problems). > > I also tried the other debugging method (using syslog and dbg()) with Version 2.0.1pre4 and qnx. All I got in my syslog is the following(no debugging info): > > Jul 14 17:54:48 nto : [wrn][6328357:broker.c:105:broker_create] CGI support disabled, use --enable_cgi to enable it > Jul 14 17:54:48 nto : [wrn][6328357:broker.c:112:broker_create] File system support disabled, use --enable_fs to enable it > > Is there a version that both supports qnx and has no debugging problems? Sorry Ying, in these very days we are completely restructuring our test environment, so I have no way to test the QNX build environment. Do you have any box that I can access to try fixing the 2.2.1 problems ? ciao, t. From sxcxx at yahoo.com Thu Jul 15 12:53:32 2010 From: sxcxx at yahoo.com (ying chen) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] debugging problem In-Reply-To: Message-ID: <488448.5364.qm@web112605.mail.gq1.yahoo.com> Thanks, Tho! I will let you know once I have the box setup. Regards, Ying --- On Thu, 7/15/10, tho wrote: > From: tho > Subject: Re: [Klone-users] debugging problem > To: "Klone users" > Received: Thursday, July 15, 2010, 11:45 PM > > On Jul 15, 2010, at 5:37 PM, ying chen wrote: > > I tried 2.2.1, and the debugging is working on my > Linux machine! Thank you! > > > > But my ultimate goal is to run klone on a target > running qnx. I modified the Makefile you gave me to add > "MAKL_PLATFORM = qnx-ppcbe" and got lots of compilation > errors. Version 2.0.1pre4 works OK with qnx(but having > debugging problems). > > > > I also tried the other debugging method (using syslog > and dbg()) with Version 2.0.1pre4 and qnx. All I got in my > syslog is the following(no debugging info): > > > > Jul 14 17:54:48 nto : > [wrn][6328357:broker.c:105:broker_create] CGI support > disabled, use --enable_cgi to enable it > > Jul 14 17:54:48 nto : > [wrn][6328357:broker.c:112:broker_create] File system > support disabled, use --enable_fs to enable it > > > > Is there a version that both supports qnx and has no > debugging problems? > > Sorry Ying, in these very days we are completely > restructuring our test environment, so I have no way to test > the QNX build environment.? > Do you have any box that I can access to try fixing the > 2.2.1 problems ? > > ciao, t. > _______________________________________________ > Klone-users mailing list > Klone-users@koanlogic.com > http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users > From spell_gooder_now at spellingbeewinnars.org Mon Jul 19 20:21:51 2010 From: spell_gooder_now at spellingbeewinnars.org (Patrick) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] Klone as Daemon? Message-ID: <4C44EC1F.8080100@spellingbeewinnars.org> Does anyone think it would be sensible to use Klone as a Daemon to provide services on a PC? Similar to CUPS for printing? I have a special interface used for GPIB and I would like to share it between processes, languages and possibly other computers in format that would have easy library support. Any thoughts? Thanks for reading-Patrick From spell_gooder_now at spellingbeewinnars.org Mon Jul 19 22:02:09 2010 From: spell_gooder_now at spellingbeewinnars.org (Patrick) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] Klone as Hardware Daemon? In-Reply-To: <4C44EC1F.8080100@spellingbeewinnars.org> References: <4C44EC1F.8080100@spellingbeewinnars.org> Message-ID: <4C4503A1.8010709@spellingbeewinnars.org> Sorry for the low quality posting everyone. I meant to say, would Klone be good for a hardware Daemon? I don't understand the underlying C well enough yet to know how hard it would be to add features for hardware access. I realize that it is already an http Daemon-Patrick From tho at koanlogic.com Tue Jul 20 04:07:49 2010 From: tho at koanlogic.com (tho) Date: Fri Aug 3 20:08:10 2012 Subject: [Klone-users] Klone as Daemon? In-Reply-To: <4C44EC1F.8080100@spellingbeewinnars.org> References: <4C44EC1F.8080100@spellingbeewinnars.org> Message-ID: <7E7EE7F0-946C-4B0F-97EB-8750C9A99A3D@koanlogic.com> Hi Patrick, On Jul 20, 2010, at 2:21 AM, Patrick wrote: > Does anyone think it would be sensible to use Klone as a Daemon to provide services on a PC? Similar to CUPS for printing? I have a special interface used for GPIB and I would like to share it between processes, languages and possibly other computers in format that would have easy library support. > > Any thoughts? I've no GPIB experience, so I'm not the most qualified person to give a sensible advice, anyway, it sounds like a good idea :) Has GPIB any standard hi-level API ? In such case you could start from a simple RPC-style HTTP mapping. ciao, t.