public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [RFA] ARI fixes for gdbtk directories
@ 2009-04-06 22:32 Pierre Muller
  2009-04-06 22:51 ` Keith Seitz
  0 siblings, 1 reply; 13+ messages in thread
From: Pierre Muller @ 2009-04-06 22:32 UTC (permalink / raw)
  To: insight

A few more ARI fixes for gdbtk.

Is this OK?


Pierre Muller
Pascal language support maintainer for GDB





2009-04-07  Pierre Muller  <muller.u-strasbg.fr²>

	ARI fixes: xvasprintf and strdup rules.
	* generic/gdbtk-cmds.c (gdbtk_set_result): Replace xvasprintf by
	xstrvprintf.
	* generic/gdbtk-hooks.c (gdbtk_warning): Ditto.
	(gdbtk_readline_begin, gdbtk_query): Ditto.
	* generic/gdbtk.c (TclDebug): Ditto.
	* generic/gdbtk-varobj.c (variable_create): Replace strdup by
xstrdup.

Index: generic/gdbtk-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
retrieving revision 1.107
diff -u -p -r1.107 gdbtk-cmds.c
--- generic/gdbtk-cmds.c	25 Mar 2009 23:43:07 -0000	1.107
+++ generic/gdbtk-cmds.c	6 Apr 2009 22:20:33 -0000
@@ -2911,7 +2911,7 @@ gdbtk_set_result (Tcl_Interp *interp, co
   char *buf;
 
   va_start (args, fmt);
-  xvasprintf (&buf, fmt, args);
+  buf = xstrvprintf (, fmt, args);
   va_end (args);
   Tcl_SetObjResult (interp, Tcl_NewStringObj (buf, -1));
   xfree(buf);
Index: generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.47
diff -u -p -r1.47 gdbtk-hooks.c
--- generic/gdbtk-hooks.c	25 Mar 2009 23:43:07 -0000	1.47
+++ generic/gdbtk-hooks.c	6 Apr 2009 22:20:33 -0000
@@ -348,7 +348,7 @@ static void
 gdbtk_warning (const char *warning, va_list args)
 {
   char *buf;
-  xvasprintf (&buf, warning, args);
+  buf = xstrvprintf (, warning, args);
   gdbtk_two_elem_cmd ("gdbtk_tcl_warning", buf);
   free(buf);
 }
@@ -488,7 +488,7 @@ gdbtk_readline_begin (char *format,...)
   char *buf;
 
   va_start (args, format);
-  xvasprintf (&buf, format, args);
+  buf = xstrvprintf (, format, args);
   gdbtk_two_elem_cmd ("gdbtk_tcl_readline_begin", buf);
   free(buf);
 }
@@ -684,7 +684,7 @@ gdbtk_query (const char *query, va_list 
   char *buf;
   long val;
 
-  xvasprintf (&buf, query, args);
+  buf = xstrvprintf (, query, args);
   gdbtk_two_elem_cmd ("gdbtk_tcl_query", buf);
   free(buf);
 
Index: generic/gdbtk.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v
retrieving revision 1.48
diff -u -p -r1.48 gdbtk.c
--- generic/gdbtk.c	25 Mar 2009 23:43:07 -0000	1.48
+++ generic/gdbtk.c	6 Apr 2009 22:20:34 -0000
@@ -215,7 +215,7 @@ TclDebug (char level, const char *fmt,..
   va_start (args, fmt);
 
 
-  xvasprintf (&buf, fmt, args);
+  buf = xstrvprintf (, fmt, args);
   va_end (args);
 
   v[0] = "dbug";
Index: generic/gdbtk-varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-varobj.c,v
retrieving revision 1.22
diff -u -p -r1.22 gdbtk-varobj.c
--- generic/gdbtk-varobj.c	14 Jul 2008 23:43:36 -0000	1.22
+++ generic/gdbtk-varobj.c	6 Apr 2009 22:20:33 -0000
@@ -323,7 +323,7 @@ variable_create (Tcl_Interp *interp, int
   else
     {
       /* specified name for object */
-      obj_name = strdup (name);
+      obj_name = xstrdup (name);
       objv++;
       objc--;
     }


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] ARI fixes for gdbtk directories
  2009-04-06 22:32 [RFA] ARI fixes for gdbtk directories Pierre Muller
@ 2009-04-06 22:51 ` Keith Seitz
  2009-04-06 23:14   ` Pierre Muller
  0 siblings, 1 reply; 13+ messages in thread
From: Keith Seitz @ 2009-04-06 22:51 UTC (permalink / raw)
  To: Pierre Muller; +Cc: insight

Pierre Muller wrote:
> A few more ARI fixes for gdbtk.
> 
> Is this OK?

Absolutely. Thank you!

Keith

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [RFA] ARI fixes for gdbtk directories
  2009-04-06 22:51 ` Keith Seitz
@ 2009-04-06 23:14   ` Pierre Muller
  2009-04-06 23:18     ` cygwin runtime woes (was Re: [RFA] ARI fixes for gdbtk directories) Keith Seitz
  0 siblings, 1 reply; 13+ messages in thread
From: Pierre Muller @ 2009-04-06 23:14 UTC (permalink / raw)
  To: 'Keith Seitz'; +Cc: insight



> -----Message d'origine-----
> De : insight-owner@sourceware.org [mailto:insight-owner@sourceware.org]
> De la part de Keith Seitz
> Envoyé : Tuesday, April 07, 2009 12:51 AM
> À : Pierre Muller
> Cc : insight@sourceware.org
> Objet : Re: [RFA] ARI fixes for gdbtk directories
> 
> Pierre Muller wrote:
> > A few more ARI fixes for gdbtk.
> >
> > Is this OK?
> 
> Absolutely. Thank you!
Almost...

-  xvasprintf (&buf, fmt, args);
+  buf = xstrvprintf (, fmt, args);
  I forgot to remove the coma!

  Luckily I figured it out before committing...
Commit done...

  I am still only able to compile
with cygwin,
  The compiled insight binary
exits at the first call to a Tcl function :(



Pierre Muller
Pascal language support maintainer for GDB




^ permalink raw reply	[flat|nested] 13+ messages in thread

* cygwin runtime woes (was Re: [RFA] ARI fixes for gdbtk directories)
  2009-04-06 23:14   ` Pierre Muller
@ 2009-04-06 23:18     ` Keith Seitz
  2009-04-06 23:32       ` Pierre Muller
  0 siblings, 1 reply; 13+ messages in thread
From: Keith Seitz @ 2009-04-06 23:18 UTC (permalink / raw)
  To: Pierre Muller; +Cc: insight

Pierre Muller wrote:

>   I am still only able to compile
> with cygwin,
>   The compiled insight binary
> exits at the first call to a Tcl function :(

Which tcl function? Can you give me a backtrace? Sounds like an error 
message is getting swallowed. Maybe it cannot find the library or somesuch.

Keith

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: cygwin runtime woes (was Re: [RFA] ARI fixes for gdbtk directories)
  2009-04-06 23:18     ` cygwin runtime woes (was Re: [RFA] ARI fixes for gdbtk directories) Keith Seitz
@ 2009-04-06 23:32       ` Pierre Muller
  2009-04-06 23:52         ` Keith Seitz
  0 siblings, 1 reply; 13+ messages in thread
From: Pierre Muller @ 2009-04-06 23:32 UTC (permalink / raw)
  To: 'Keith Seitz'; +Cc: insight

I finally managed to get one:
Can you do something with this??

Pierre 

(gdb) bt
#0  error (string=0x62915c "Argument required (%s).")
    at ../../purecvs/gdb/utils.c:812
#1  0x0041a741 in error_no_arg (why=0x6399f0 "expression to compute")
    at ../../purecvs/gdb/cli/cli-cmds.c:190
#2  0x00454028 in parse_exp_in_context (stringptr=0x22a4e0, block=0x0,
    comma=0, void_context_p=0, out_subexp=0x0)
    at ../../purecvs/gdb/parse.c:1059
#3  0x00433bbf in parse_and_eval_address_1 (expptr=0x22a4e0)
    at ../../purecvs/gdb/eval.c:102
#4  0x004ab302 in decode_line_1 (argptr=0x22a4e0, funfirstline=1,
    default_symtab=0x0, default_line=0, canonical=0x0, not_found_ptr=0x0)
    at ../../purecvs/gdb/linespec.c:976
#5  0x00468927 in decode_line_spec (string=0x10273941 "", funfirstline=1)
    at ../../purecvs/gdb/symtab.c:4355
#6  0x004a4fc8 in gdb_loc (clientData=0x4a4d90, interp=0x101274b0, objc=2,
    objv=0x101280a0) at ../../purecvs/gdb/gdbtk/generic/gdbtk-cmds.c:2170
#7  0x004a15d6 in wrapped_call (opaque_args=0x22a5b0)
    at ../../purecvs/gdb/gdbtk/generic/gdbtk-cmds.c:425
#8  0x0041318b in catch_errors (func=0x4a15b0 <wrapped_call>,
    func_args=0x22a5b0, errstring=0x653e13 "", mask=6)
    at ../../purecvs/gdb/exceptions.c:510
#9  0x004a14b1 in gdbtk_call_wrapper (clientData=0x4a4d90,
interp=0x101274b0,
    objc=2, objv=0x101280a0)
    at ../../purecvs/gdb/gdbtk/generic/gdbtk-cmds.c:356
#10 0x1000d71f in tcl84!TclEvalObjvInternal () from
/home/Pierre/bin/tcl84.dll
#11 0x10033e6d in tcl84!TclExprFloatError () from /home/Pierre/bin/tcl84.dll
#12 0x10037bef in tcl84!TclCompEvalObj () from /home/Pierre/bin/tcl84.dll
#13 0x1005ea8f in tcl84!TclObjInterpProc () from /home/Pierre/bin/tcl84.dll
#14 0x1000d71f in tcl84!TclEvalObjvInternal () from
/home/Pierre/bin/tcl84.dll
#15 0x10033e6d in tcl84!TclExprFloatError () from /home/Pierre/bin/tcl84.dll
#16 0x10037bef in tcl84!TclCompEvalObj () from /home/Pierre/bin/tcl84.dll
#17 0x1005ea8f in tcl84!TclObjInterpProc () from /home/Pierre/bin/tcl84.dll
#18 0x1000d71f in tcl84!TclEvalObjvInternal () from
/home/Pierre/bin/tcl84.dll
#19 0x1000ecfa in tcl84!Tcl_EvalEx () from /home/Pierre/bin/tcl84.dll
#20 0x1004d6a1 in tcl84!Tcl_FSEvalFile () from /home/Pierre/bin/tcl84.dll
#21 0x1000d71f in tcl84!TclEvalObjvInternal () from
/home/Pierre/bin/tcl84.dll
#22 0x1000f692 in tcl84!Tcl_EvalObjv () from /home/Pierre/bin/tcl84.dll
#23 0x1000f888 in tcl84!Tcl_EvalObjEx () from /home/Pierre/bin/tcl84.dll
#24 0x1005e298 in tcl84!Tcl_UplevelObjCmd () from /home/Pierre/bin/tcl84.dll
#25 0x1000d71f in tcl84!TclEvalObjvInternal () from
/home/Pierre/bin/tcl84.dll
#26 0x10033e6d in tcl84!TclExprFloatError () from /home/Pierre/bin/tcl84.dll
#27 0x10037bef in tcl84!TclCompEvalObj () from /home/Pierre/bin/tcl84.dll
#28 0x1005ea8f in tcl84!TclObjInterpProc () from /home/Pierre/bin/tcl84.dll
#29 0x1000d71f in tcl84!TclEvalObjvInternal () from
/home/Pierre/bin/tcl84.dll
#30 0x10033e6d in tcl84!TclExprFloatError () from /home/Pierre/bin/tcl84.dll
#31 0x10037bef in tcl84!TclCompEvalObj () from /home/Pierre/bin/tcl84.dll
#32 0x1005ea8f in tcl84!TclObjInterpProc () from /home/Pierre/bin/tcl84.dll
#33 0x1000d71f in tcl84!TclEvalObjvInternal () from
/home/Pierre/bin/tcl84.dll
#34 0x1000ecfa in tcl84!Tcl_EvalEx () from /home/Pierre/bin/tcl84.dll
#35 0x1000f119 in tcl84!Tcl_Eval () from /home/Pierre/bin/tcl84.dll
#36 0x1000f9f8 in tcl84!Tcl_GlobalEval () from /home/Pierre/bin/tcl84.dll
#37 0x00412436 in gdbtk_source_start_file ()
    at ../../purecvs/gdb/gdbtk/generic/gdbtk.c:627
#38 0x004b1943 in gdbtk_interpreter_resume (data=0x1010b8e0)
    at ../../purecvs/gdb/gdbtk/generic/gdbtk-interp.c:106
#39 0x0041d219 in interp_set (interp=0x10104e30, top_level=1)
    at ../../purecvs/gdb/interps.c:197
#40 0x0040163a in captured_main (data=0x22cc80)
    at ../../purecvs/gdb/main.c:743
#41 0x0041318b in catch_errors (func=0x401270 <captured_main>,
    func_args=0x22cc80, errstring=0x620008 "", mask=6)
    at ../../purecvs/gdb/exceptions.c:510
#42 0x00402423 in gdb_main (args=0x22cc80) at ../../purecvs/gdb/main.c:913
#43 0x0040109b in main (argc=1, argv=0x100b1fd0)
    at ../../purecvs/gdb/gdbtk/generic/gdbtk-main.c:36
(gdb)

> -----Message d'origine-----
> De : insight-owner@sourceware.org [mailto:insight-owner@sourceware.org]
> De la part de Keith Seitz
> Envoyé : Tuesday, April 07, 2009 1:18 AM
> À : Pierre Muller
> Cc : insight@sourceware.org
> Objet : cygwin runtime woes (was Re: [RFA] ARI fixes for gdbtk
> directories)
> 
> Pierre Muller wrote:
> 
> >   I am still only able to compile
> > with cygwin,
> >   The compiled insight binary
> > exits at the first call to a Tcl function :(
> 
> Which tcl function? Can you give me a backtrace? Sounds like an error
> message is getting swallowed. Maybe it cannot find the library or
> somesuch.
> 
> Keith

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: cygwin runtime woes (was Re: [RFA] ARI fixes for gdbtk directories)
  2009-04-06 23:32       ` Pierre Muller
@ 2009-04-06 23:52         ` Keith Seitz
  2009-04-07  6:54           ` Pierre Muller
  0 siblings, 1 reply; 13+ messages in thread
From: Keith Seitz @ 2009-04-06 23:52 UTC (permalink / raw)
  To: Pierre Muller; +Cc: insight

Pierre Muller wrote:
> I finally managed to get one:
> Can you do something with this??

This is kind of odd...

> (gdb) bt
> #0  error (string=0x62915c "Argument required (%s).")
>     at ../../purecvs/gdb/utils.c:812
[snip]
> #8  0x0041318b in catch_errors (func=0x4a15b0 <wrapped_call>,
>     func_args=0x22a5b0, errstring=0x653e13 "", mask=6)
>     at ../../purecvs/gdb/exceptions.c:510

Frame 8, catch_errors, should have caught any the call to frame 0. 
However, the question is, why is gdb_loc calling decode_line_1 with no 
arguments?

My memory is a little fuzzy about this, but I fired up insight on my 
linux box under gdb and set a breakpoint in gdb_loc. As I recall, this 
happens at start-up to find "main", but for some reason, it appears that 
the argument which should contain "main" instead contains an empty string.

Can you set a breakpoint in gdb_loc, run insight, and tell me what objc 
is? It should be 2, and objv[0]->bytes should be "gdb_loc" and 
objv[1]->bytes should be "main".

Is this not the case?

Keith

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: cygwin runtime woes (was Re: [RFA] ARI fixes for gdbtk directories)
  2009-04-06 23:52         ` Keith Seitz
@ 2009-04-07  6:54           ` Pierre Muller
  2009-05-06 16:11             ` cygwin runtime woes Keith Seitz
  0 siblings, 1 reply; 13+ messages in thread
From: Pierre Muller @ 2009-04-07  6:54 UTC (permalink / raw)
  To: 'Keith Seitz'; +Cc: insight

I debugged the problem a bit:

gdb_loc is call a few times
for 'main' 'MAIN___' 'MAIN__' 'cyg_user_start' 'cyg_start' 
and then finally with '*' which causes the abort.

the first calls all fail with
"No symbol table loaded. Use "file" command"
even though I used ./gdb.exe as arg for run command.

It cycles through that list twice but 
goes behind to finally call
gdb_force_quit a little bit later.

Last call to wrapped_call before this is
gdb_restore_fputs...

bjut this all doesn't help me much,
maybe it explains something for you...


Pierre Muller
Pascal language support maintainer for GDB



> -----Message d'origine-----
> De : insight-owner@sourceware.org [mailto:insight-owner@sourceware.org]
> De la part de Keith Seitz
> Envoyé : Tuesday, April 07, 2009 1:53 AM
> À : Pierre Muller
> Cc : insight@sourceware.org
> Objet : Re: cygwin runtime woes (was Re: [RFA] ARI fixes for gdbtk
> directories)
> 
> Pierre Muller wrote:
> > I finally managed to get one:
> > Can you do something with this??
> 
> This is kind of odd...
> 
> > (gdb) bt
> > #0  error (string=0x62915c "Argument required (%s).")
> >     at ../../purecvs/gdb/utils.c:812
> [snip]
> > #8  0x0041318b in catch_errors (func=0x4a15b0 <wrapped_call>,
> >     func_args=0x22a5b0, errstring=0x653e13 "", mask=6)
> >     at ../../purecvs/gdb/exceptions.c:510
> 
> Frame 8, catch_errors, should have caught any the call to frame 0.
> However, the question is, why is gdb_loc calling decode_line_1 with no
> arguments?
> 
> My memory is a little fuzzy about this, but I fired up insight on my
> linux box under gdb and set a breakpoint in gdb_loc. As I recall, this
> happens at start-up to find "main", but for some reason, it appears
> that
> the argument which should contain "main" instead contains an empty
> string.
> 
> Can you set a breakpoint in gdb_loc, run insight, and tell me what objc
> is? It should be 2, and objv[0]->bytes should be "gdb_loc" and
> objv[1]->bytes should be "main".
> 
> Is this not the case?
> 
> Keith

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: cygwin runtime woes
  2009-04-07  6:54           ` Pierre Muller
@ 2009-05-06 16:11             ` Keith Seitz
  2009-05-06 16:24               ` Pierre Muller
  2009-05-06 16:41               ` Pierre Muller
  0 siblings, 2 replies; 13+ messages in thread
From: Keith Seitz @ 2009-05-06 16:11 UTC (permalink / raw)
  To: Pierre Muller; +Cc: insight

Pierre Muller wrote:
> I debugged the problem a bit:
> 
> gdb_loc is call a few times
> for 'main' 'MAIN___' 'MAIN__' 'cyg_user_start' 'cyg_start' 
> and then finally with '*' which causes the abort.

That sounds normal. When insight starts up and gdb loads an executable, 
it will attempt to locate the entry point for the executable so that the 
source window can display it. These function names are actually from the 
preference gdb/main_names, defined in prefs.tcl.

The '*' argument is odd. I don't know where that is coming from. Passing 
'*' to gdb_loc will cause gdb_loc to error, though.

Out of curiosity, have you tried inhibiting preferences at startup? 
(insight -nx) Does it make any difference?

> the first calls all fail with
> "No symbol table loaded. Use "file" command"
> even though I used ./gdb.exe as arg for run command.

That sounds odd, too. Can you start vanilla gdb this way? I wonder what 
insight might be complaining about. Have you tried running insight in 
debug mode? To enable this, set GDBTK_DEBUG=1 in your environment before 
starting insight. It will write out the file "insight.log" (which you 
can change by setting GDBTK_DEBUGFILE).

Keith

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: cygwin runtime woes
  2009-05-06 16:11             ` cygwin runtime woes Keith Seitz
@ 2009-05-06 16:24               ` Pierre Muller
  2009-05-06 16:31                 ` Keith Seitz
  2009-05-06 16:41               ` Pierre Muller
  1 sibling, 1 reply; 13+ messages in thread
From: Pierre Muller @ 2009-05-06 16:24 UTC (permalink / raw)
  To: 'Keith Seitz'; +Cc: insight



Pierre@d620-muller ~/gdbcvs/build-normal/gdb
$ export GDBTK_DEBUG=1

Pierre@d620-muller ~/gdbcvs/build-normal/gdb

Pierre@d620-muller ~/gdbcvs/build-normal/gdb
$ gdbcvs ./insight.exe
GNU gdb (GDB) 6.8.50.20090306-cvs
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Setting up the environment for debugging gdb.
During symbol reading, struct/union type gets multiply defined: struct type.
Breakpoint 1 at 0x40c8d0: file ../../purecvs/gdb/utils.c, line 993.
Breakpoint 2 at 0x41cced: file ../../purecvs/gdb/cli/cli-cmds.c, line 199.
(top-gdb) set new-c
(top-gdb) r ./gdb.exe
Starting program: /usr/local/src/gdbcvs/build-normal/gdb/insight.exe
./gdb.exe
[New Thread 168.0x35c]
[New Thread 168.0x15d4]
[New Thread 168.0x111c]
[New Thread 168.0x1224]
[New Thread 168.0x5a0]
[New Thread 168.0xaa8]
[New Thread 168.0x1300]
[New Thread 168.0x1544]
[New Thread 168.0x1114]

Program received signal SIGSEGV, Segmentation fault.
0x7473d529 in TF_GetLangIcon () from /cygdrive/d/WINDOWS/system32/msctf.dll
(top-gdb) bt
#0  0x7473d529 in TF_GetLangIcon ()
   from /cygdrive/d/WINDOWS/system32/msctf.dll
#1  0x7472513a in TF_CreateCategoryMgr ()
   from /cygdrive/d/WINDOWS/system32/msctf.dll
#2  0x74725382 in TF_CreateCategoryMgr ()
   from /cygdrive/d/WINDOWS/system32/msctf.dll
#3  0x74721dd3 in ?? () from /cygdrive/d/WINDOWS/system32/msctf.dll
#4  0x74720000 in ?? ()
#5  0x00000000 in ?? ()
(top-gdb) inf thr
* 1 Thread 168.0x35c  0x7473d529 in TF_GetLangIcon ()
   from /cygdrive/d/WINDOWS/system32/msctf.dll
(top-gdb) q
The program is running.  Quit anyway (and kill it)? (y or n) y


$ cat insight.log
I global pref_set_defaults {}
I global set_bg_colors {}
I global r_setcolors {. -background #cccccc}
I global r_setcolors {. -highlightbackground #cccccc}
I global r_setcolors {. -textbackground #ffffff}
I global r_setcolors {. -troughcolor #b8b8b8}
I global r_setcolors {. -activebackground #b8b8b8}
I global gdbtk_locate_main {}
I global gdbtk_clear_file {}
I global gdbtk_locate_main {}
I ManagedWin find SrcWin
I global gdbtk_locate_main {}
I SrcWin point_to_main {could not find main}
I global gdbtk_tcl_warning {struct/union type gets multiply defined: struct
type
}
I ManagedWin startup {Got active list {ManagedWin::open ProcessWin}}
I ManagedWin _open {ProcessWin }
I ManagedWin _create {win=processwin args=}
I GDBWin constructor {}
I EmbeddedWin constructor {}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to
"::.process
win0.processwin"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to
"::.process
win0.processwin"}
I EmbeddedWin destructor {}
I global pref_save {pref_save E:/cygwin/home/Pierre/gdbtk.ini}

Does that help you?

Pierre

> -----Message d'origine-----
> De : insight-owner@sourceware.org [mailto:insight-owner@sourceware.org]
> De la part de Keith Seitz
> Envoyé : Wednesday, May 06, 2009 6:11 PM
> À : Pierre Muller
> Cc : insight@sourceware.org
> Objet : Re: cygwin runtime woes
> 
> Pierre Muller wrote:
> > I debugged the problem a bit:
> >
> > gdb_loc is call a few times
> > for 'main' 'MAIN___' 'MAIN__' 'cyg_user_start' 'cyg_start'
> > and then finally with '*' which causes the abort.
> 
> That sounds normal. When insight starts up and gdb loads an executable,
> it will attempt to locate the entry point for the executable so that
> the
> source window can display it. These function names are actually from
> the
> preference gdb/main_names, defined in prefs.tcl.
> 
> The '*' argument is odd. I don't know where that is coming from.
> Passing
> '*' to gdb_loc will cause gdb_loc to error, though.
> 
> Out of curiosity, have you tried inhibiting preferences at startup?
> (insight -nx) Does it make any difference?
> 
> > the first calls all fail with
> > "No symbol table loaded. Use "file" command"
> > even though I used ./gdb.exe as arg for run command.
> 
> That sounds odd, too. Can you start vanilla gdb this way? I wonder what
> insight might be complaining about. Have you tried running insight in
> debug mode? To enable this, set GDBTK_DEBUG=1 in your environment
> before
> starting insight. It will write out the file "insight.log" (which you
> can change by setting GDBTK_DEBUGFILE).
> 
> Keith

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: cygwin runtime woes
  2009-05-06 16:24               ` Pierre Muller
@ 2009-05-06 16:31                 ` Keith Seitz
  2009-05-06 20:45                   ` Pierre Muller
  0 siblings, 1 reply; 13+ messages in thread
From: Keith Seitz @ 2009-05-06 16:31 UTC (permalink / raw)
  To: Pierre Muller; +Cc: insight

Pierre Muller wrote:

> Does that help you?

Wow, that's messed up... A segfault?

Out of curiosity, can you try this again but pass "-nx" to insight as well?

Keith

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: cygwin runtime woes
  2009-05-06 16:11             ` cygwin runtime woes Keith Seitz
  2009-05-06 16:24               ` Pierre Muller
@ 2009-05-06 16:41               ` Pierre Muller
  1 sibling, 0 replies; 13+ messages in thread
From: Pierre Muller @ 2009-05-06 16:41 UTC (permalink / raw)
  To: 'Keith Seitz'; +Cc: insight

The -nx made a bigger difference!!!

I had a starting insight !

Thus I removed the gdbtk.ini file
and retried to start insight with gdb.exe
but I got no source window, and when I tried to
load gdb.exe manually after, I got this:

can't set "gdb_loaded": {hook=namespace inscope ::SrcWin {::.srcwin0.srcwin
_set_state} args="gdb_loaded" can't read "twin": no such variable
}
    while executing
"set gdb_loaded 0"
    (procedure "set_exe" line 24)
    invoked from within
"set_exe"
    (procedure "_open_file" line 63)
    invoked from within
"_open_file"
    (menu invoke)errorCode is NONE


> -----Message d'origine-----
> De : insight-owner@sourceware.org [mailto:insight-owner@sourceware.org]
> De la part de Keith Seitz
> Envoyé : Wednesday, May 06, 2009 6:11 PM
> À : Pierre Muller
> Cc : insight@sourceware.org
> Objet : Re: cygwin runtime woes
> 
> Pierre Muller wrote:
> > I debugged the problem a bit:
> >
> > gdb_loc is call a few times
> > for 'main' 'MAIN___' 'MAIN__' 'cyg_user_start' 'cyg_start'
> > and then finally with '*' which causes the abort.
> 
> That sounds normal. When insight starts up and gdb loads an executable,
> it will attempt to locate the entry point for the executable so that
> the
> source window can display it. These function names are actually from
> the
> preference gdb/main_names, defined in prefs.tcl.
> 
> The '*' argument is odd. I don't know where that is coming from.
> Passing
> '*' to gdb_loc will cause gdb_loc to error, though.
> 
> Out of curiosity, have you tried inhibiting preferences at startup?
> (insight -nx) Does it make any difference?
> 
> > the first calls all fail with
> > "No symbol table loaded. Use "file" command"
> > even though I used ./gdb.exe as arg for run command.
> 
> That sounds odd, too. Can you start vanilla gdb this way? I wonder what
> insight might be complaining about. Have you tried running insight in
> debug mode? To enable this, set GDBTK_DEBUG=1 in your environment
> before
> starting insight. It will write out the file "insight.log" (which you
> can change by setting GDBTK_DEBUGFILE).
> 
> Keith

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: cygwin runtime woes
  2009-05-06 16:31                 ` Keith Seitz
@ 2009-05-06 20:45                   ` Pierre Muller
  2009-05-07  2:06                     ` Keith Seitz
  0 siblings, 1 reply; 13+ messages in thread
From: Pierre Muller @ 2009-05-06 20:45 UTC (permalink / raw)
  To: 'Keith Seitz'; +Cc: insight

Tried it another way:

./gdb ./insight.exe

(gdb) run --nw ./gdb.exe

Insight starts but no source window with 'main' function code appears.

insight.log contains the folliwng:

$ cat insight.log
I global pref_set_defaults {}
I global set_bg_colors {}
I global r_setcolors {. -background #cccccc}
I global r_setcolors {. -highlightbackground #cccccc}
I global r_setcolors {. -textbackground #ffffff}
I global r_setcolors {. -troughcolor #b8b8b8}
I global r_setcolors {. -activebackground #b8b8b8}
I global gdbtk_locate_main {}
I global gdbtk_clear_file {}
I global gdbtk_locate_main {}
I ManagedWin find SrcWin
I global gdbtk_locate_main {}
I SrcWin point_to_main {could not find main}
I ManagedWin startup {Got active list }
I ManagedWin find SrcWin
I ManagedWin _open {SrcWin }
I ManagedWin _create {win=srcwin args=}
I GDBWin constructor {}
I TopLevelWin constructor .srcwin0.srcwin
I SrcWin constructor {}
I SrcBar create_plugin_menu {No plugins configured, go remove the PlugIn
menu...
}
I GDBMenuBar set_class_state {Enable list is: Color normal}
I SrcBar _set_runstop normal
I SrcBar enable_ui {2 - Browsing=0}
I GDBMenuBar set_class_state {Enable list is: Control disabled  Trace
disabled
Other normal  Attach normal  Detach disabled }
I GDBToolBar set_class_state {Enable list is: Control disabled  Trace
disabled
Other normal  Attach normal  Detach disabled }
I SrcBar {} {configuring runstop normal}
I SrcBar _set_runstop normal
I GDBWin constructor {}
I GDBWin destructor {}
E SrcWin constructor {_build_win returned: invalid command name
"iwidgets::scrol
ledtext"
    while executing
"iwidgets::scrolledtext $pane1.st  -hscrollmode dynamic -vscrollmode
dynamic"
    (object "::.srcwin0.srcwin.container.pane2.childsite.con" method
"::SrcTextW
in::build_win" body line 12)
    invoked from within
"build_win"
    while constructing object
"::.srcwin0.srcwin.container.pane2.childsite.con"
in ::SrcTextWin::constructor (body line 30)
    invoked from within
"SrcTextWin $srcwin -Tracing $Tracing -parent $this"
    (object "::.srcwin0.srcwin" method "::SrcWin::_build_win" body line 53)
    invoked from within
"_build_win"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to
"::.srcwin0
.srcwin.container.pane0.childsite.con"}
I SrcBar enable_ui {1 - Browsing=0}
I GDBMenuBar set_class_state {Enable list is: Trace disabled  Control normal
Ot
her normal  Attach disabled  Detach normal }
I GDBToolBar set_class_state {Enable list is: Trace disabled  Control normal
Ot
her normal  Attach disabled  Detach normal }
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to
"::.srcwin0
.srcwin"}
I SrcBar {} {configuring runstop normal}
I SrcBar _set_runstop normal
E GDBEventHandler GDBEventHandler::dispatch {On idle event,
::.srcwin0.srcwin er
rored:
can't read "twin": no such variable
    while executing
"$twin enable $on"
    (object "::.srcwin0.srcwin" method "::SrcWin::enable_ui" body line 17)
    invoked from within
"enable_ui 1"
    (object "::.srcwin0.srcwin" method "::SrcWin::idle" body line 3)
    invoked from within
"$w $handler $event"}
I SrcBar enable_ui {2 - Browsing=0}
I GDBMenuBar set_class_state {Enable list is: Control disabled  Trace
disabled
Other normal  Attach normal  Detach disabled }
I GDBToolBar set_class_state {Enable list is: Control disabled  Trace
disabled
Other normal  Attach normal  Detach disabled }
E global gdbtk_idle {no_inferior_hook error: {hook=::.srcwin0.srcwin
no_inferior
 args="" can't read "_status": no such variable
}}
I Session notice_file_change {noticed file change event for ./gdb.exe}
I GDBEventHandler GDBEventHandler::dispatch {posting event "set_variable" to
"::
.srcwin0.srcwin.container.pane0.childsite.con"}
I SrcBar set_variable {Got remotebaud = 38400}
I GDBEventHandler GDBEventHandler::dispatch {posting event "set_variable" to
"::
.srcwin0.srcwin"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "update" to
"::.srcwi
n0.srcwin.container.pane0.childsite.con"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "update" to
"::.srcwi
n0.srcwin"}
E GDBEventHandler GDBEventHandler::dispatch {On update event,
::.srcwin0.srcwin
errored:
can't read "twin": no such variable
    while executing
"if {$twin == ""} {
    return ""
  } else {
    return [$twin get_file]
  }"
    (object "::.srcwin0.srcwin" method "::SrcWin::get_file" body line 2)
    invoked from within
"$pc_window get_file"
    (procedure "::SrcWin::_choose_window" body line 9)
    invoked from within
"_choose_window $file"
    (procedure "::SrcWin::choose_and_update" body line 15)
    invoked from within
"choose_and_update"
    (object "::.srcwin0.srcwin" method "::SrcWin::update" body line 10)
    invoked from within
"$w $handler $event"}
I ManagedWin find SrcWin
I SrcWin destructor {}
I TopLevelWin destructor {}


All seems to start with the failure to handle
iwidgets::scrolledtext command,
any ideas what this is all about?

 I tried reinstalling tcl/tk for cygiwn, no effect.

Pierre


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: cygwin runtime woes
  2009-05-06 20:45                   ` Pierre Muller
@ 2009-05-07  2:06                     ` Keith Seitz
  0 siblings, 0 replies; 13+ messages in thread
From: Keith Seitz @ 2009-05-07  2:06 UTC (permalink / raw)
  To: Pierre Muller; +Cc: insight

Pierre Muller wrote:
> Tried it another way:
> 
> ./gdb ./insight.exe
> 
> (gdb) run --nw ./gdb.exe

Did you mean "run -nx ./gdb.exe"?

> Insight starts but no source window with 'main' function code appears.

Odd... Are you sure you erased all of the gdbtk.ini files lying around? 
If "-nx" works, then insight must be finding one of these files somewhere.

> E SrcWin constructor {_build_win returned: invalid command name
> "iwidgets::scrolledtext"

Yeah, for whatever reason, iwidgets::scrolledtext seems to be missing on 
your system. I can't even imagine how. Are any of TCL_LIBRARY, 
TK_LIBRARY, ITCL_LIBRARY, ITK_LIBRARY, or IWIDGETS_LIBRARY defined in 
your environment?

> All seems to start with the failure to handle
> iwidgets::scrolledtext command,
> any ideas what this is all about?
> 
>  I tried reinstalling tcl/tk for cygiwn, no effect.

 From what I can tell, the tcl/tk distributed with cygwin are not usable 
for an insight build: they are missing some internal headers that are 
required to build insight (specifically, tclInt.h and tkInt.h -- 
probably a few more). You *must* use the in-tree tcl, tk, and itcl.

I've verified this on a build of CVS HEAD on my own (ancient) x86 cygwin 
box. If you attempt to use the system-supplied tcl and tk, you will get 
errors about "private headers" missing.

Keith

PS. Getting a lot of build warnings that stop the build? Use 
--disable-werror at configure time. I did NOT have to do this on my 
machine...

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-05-07  2:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-06 22:32 [RFA] ARI fixes for gdbtk directories Pierre Muller
2009-04-06 22:51 ` Keith Seitz
2009-04-06 23:14   ` Pierre Muller
2009-04-06 23:18     ` cygwin runtime woes (was Re: [RFA] ARI fixes for gdbtk directories) Keith Seitz
2009-04-06 23:32       ` Pierre Muller
2009-04-06 23:52         ` Keith Seitz
2009-04-07  6:54           ` Pierre Muller
2009-05-06 16:11             ` cygwin runtime woes Keith Seitz
2009-05-06 16:24               ` Pierre Muller
2009-05-06 16:31                 ` Keith Seitz
2009-05-06 20:45                   ` Pierre Muller
2009-05-07  2:06                     ` Keith Seitz
2009-05-06 16:41               ` Pierre Muller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).