Hi all,
I'm trying to hack geany (0.18, for the moment) with a custom LexScheme.cxx scintilla lexer, build specifically for GNU Guile Scheme. I'm in trouble at the moment for a curious seg-fault I get loading an *.scm file I'm wondering how to insert some debugging code in the lexer module, where as the good old fprintf(stderr, ..) dont work at all. Can't include the geany_debug() function in the lexer module, right? I've used the geany hacking documentation, quite sure to have done all the necessary modifications in the various geany source file and configuration files. Any suggestion will be appreciated. :)
(Please help!)
On Thu, 05 Nov 2009 16:40:46 +0100 Roberto Rosetti rob.rosetti@gmail.com wrote:
I'm trying to hack geany (0.18, for the moment) with a custom LexScheme.cxx scintilla lexer, build specifically for GNU Guile Scheme.
I don't know scheme, but make sure you've seen the Lisp scintilla lexer.
I'm in trouble at the moment for a curious seg-fault I get loading an *.scm file
Would a gdb backtrace help?
I'm wondering how to insert some debugging code in the lexer module, where as the good old fprintf(stderr, ..) dont work at all. Can't include the geany_debug() function in the lexer module, right?
I don't know Scintilla lexer code, but have you tried C++ std::cout?
You should probably ask on the scintilla mailing list.
Regards, Nick
On Thu, 05/11/2009 alle 16.28 +0000, Nick Treleaven wrote:
On Thu, 05 Nov 2009 16:40:46 +0100 Roberto Rosetti rob.rosetti@gmail.com wrote:
I'm trying to hack geany (0.18, for the moment) with a custom LexScheme.cxx scintilla lexer, build specifically for GNU Guile Scheme.
I don't know scheme, but make sure you've seen the Lisp scintilla lexer.
Yes, thanks, it was my starting point.
I'm in trouble at the moment for a curious seg-fault I get loading an *.scm file
Would a gdb backtrace help?
I'm wondering how to insert some debugging code in the lexer module, where as the good old fprintf(stderr, ..) dont work at all. Can't include the geany_debug() function in the lexer module, right?
I don't know Scintilla lexer code, but have you tried C++ std::cout?
You should probably ask on the scintilla mailing list.
Regards, Nick
Many thanks for the fast reply. Now I'll make some serious debugging. I need to refresh my C++ knowledge a little bit. :)
Regards, Rob
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
On Thu, 05 Nov 2009 16:40:46 +0100, Roberto wrote:
Hey,
additionally to what Nick said:
I'm wondering how to insert some debugging code in the lexer module, where as the good old fprintf(stderr, ..) dont work at all. Can't include the geany_debug() function in the lexer module, right?
No, geany_debug() can't be used (at least not easily). But plain printf()'s do work, just remember to add a \n at the end of the format string so the buffer get flushed or call fflush(stdout); manually.
Regards, Enrico
On Thu, 05/11/2009 at 22.14 +0100, Enrico Tröger wrote:
On Thu, 05 Nov 2009 16:40:46 +0100, Roberto wrote:
Hey,
additionally to what Nick said:
I'm wondering how to insert some debugging code in the lexer module, where as the good old fprintf(stderr, ..) dont work at all. Can't include the geany_debug() function in the lexer module, right?
No, geany_debug() can't be used (at least not easily). But plain printf()'s do work, just remember to add a \n at the end of the format string so the buffer get flushed or call fflush(stdout); manually.
Regards, Enrico
Hi Enrico, thanks! After some std:cout calls in the lexer file, now I'm conviced the problem is *before* the call to the Lexer. Probably during the lexer data structures initialization. Got a seg-fault as I check the Scheme Language Option in the geany menu. Even from a loaded plain text. There must be some problem in the bunch of Geany source files I've modified. Need to check everything again :)
Regards, Roberto
On Fri, 06 Nov 2009 08:31:22 +0100, Roberto Rosetti rob.rosetti@gmail.com wrote:
Got a seg-fault as I check the Scheme Language Option in the geany menu. Even from a loaded plain text. There must be some problem in the bunch of Geany source files I've modified. Need to check everything again :)
Run Geany within gdb and I'm sure it will give you some information, where its segfaulting.
Cheers, Frank
On Fri, 06 Nov 2009 14:08:50 +0000 frank@frank.uvena.de wrote:
Got a seg-fault as I check the Scheme Language Option in the geany menu. Even from a loaded plain text. There must be some problem in the bunch of Geany source files I've modified. Need to check everything again :)
Run Geany within gdb and I'm sure it will give you some information, where its segfaulting.
Frank's right, but see 'Getting a backtrace' here for the details: http://www.geany.org/Support/Bugs
Regards, Nick
On Thu, 12 Nov 2009 12:46:04 +0000 Nick Treleaven nick.treleaven@btinternet.com wrote:
On Fri, 06 Nov 2009 14:08:50 +0000 frank@frank.uvena.de wrote:
Got a seg-fault as I check the Scheme Language Option in the geany menu. Even from a loaded plain text. There must be some problem in the bunch of Geany source files I've modified. Need to check everything again :)
Run Geany within gdb and I'm sure it will give you some information, where its segfaulting.
Frank's right, but see 'Getting a backtrace' here for the details: http://www.geany.org/Support/Bugs
I always miss to point to fitting pages somehow ;)
Cheers, Frank