This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: fix in features/Makefile


>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:

Tom> This patch changes features/Makefile to use gdb's logging feature
Tom> rather than redirection to create the output files.  This fixed the
Tom> problem I saw.

Daniel> But why did it?  If you can't redirect GDB's output, something's
Daniel> wrong.

Yeah, I should have looked first.

I disabled stdout buffering and used frysk's ftrace to get a stack
trace at the point where the weird stuff is written:

#0 0x00110416 in __kernel_vsyscall() from [vdso]
#1 0x05e4d135 in new_do_write() from libc-2.7.so
#2 0x05e4d41f in _IO_do_write@@GLIBC_2.1() from libc-2.7.so
#3 0x05e4dd28 in _IO_file_overflow@@GLIBC_2.1() from libc-2.7.so
#4 0x05e50793 in __overflow() from libc-2.7.so
#5 0x05e4a55b in putc() from libc-2.7.so
#6 0x082f35c5 in _rl_output_character_function() from gdb
#7 0x006c554a in tputs() from libtinfo.so.5.6
#8 0x082f3741 in _rl_enable_meta_key() from gdb
#9 0x082df0d8 in readline_initialize_everything() from gdb
#10 0x082def5c in rl_initialize() from gdb
#11 0x081a6081 in tui_initialize_readline() from gdb
#12 0x081a6ab7 in tui_init() from gdb
#13 0x0820ba2b in interp_set() from gdb
#14 0x080a1a1b in captured_main() from gdb
#15 0x0820b6cc in catch_errors() from gdb
#16 0x080a20f8 in gdb_main() from gdb
#17 0x080a1027 in main() from gdb
#18 0x05e00390 in __libc_start_main() from libc-2.7.so
#19 0x080a0f21 in _start() from gdb

So, it is readline.

Maybe we could fool it by setting TERM=dumb or something.
I suppose -batch ought to do this kind of thing automatically.
I'll file a bug report soon.

Tom> This patch also makes it so that the .c files are always rebuilt in
Tom> response to a 'make'.  Without the FORCE code, make was not running
Tom> the rule for me.

Daniel> If you're going to change the generating code, IMO it's reasonable to
Daniel> remove and remake the generated files by hand...

Note that due to the use of move-if-change, you only get updates if
there really were any.  This change just makes it simpler to ask for
the changes.  I don't really care either way though.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]