Subject: Re: strange setlocale() issue
To: None <tech-userlevel@NetBSD.org>
From: Markus Illenseer <firstname.lastname@example.org>
Date: 10/14/2003 06:35:39
> Surely ktrace shows _something_. For example, does the process die
> from exit(), or from a signal (and if the latter, which signal)?
Stops from exit() and no signal.
> I'm with greywolf: I'd run it under gdb. "break main", "run", then
> when it breaks at the beginning of main, repeatedly "step" and see what
> happens. (I'd try it myself, but I have nothing even vaguely current
> to try it on.)
here is what I get:
(gdb) break main
Breakpoint 1 at 0x804894a: file test_locale.c, line 6.
Starting program: /home/markus/src/./test_locale
Breakpoint 1, main () at test_locale.c:6
6 const char *foo = "bar";
8 if( NULL == setlocale(LC_ALL, "zh_TW.eucTW") )
16 printf("OK %s\n", foo);
0x8048750 in ___start ()
Single stepping until exit from function ___start,
which has no line number information.
Program exited normally.
Seems to go into the "else"-clause but then does nothing. "Start2" is
not printed, nor is "OK". Is that because there is no locale found for
this? Where is that __start() function hidden?