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: [PATCH] Tweaks in gdb.trace/tfile.exp


On 08/23/2012 01:10 AM, Pedro Alves wrote:
@@ -205,9 +205,12 @@ done_making_trace_files (void)
>  int
>  main (int argc, char **argv, char **envp)
>  {
>-  write_basic_trace_file ();
>+  char *basic_file_name = argv[1];
>+  char *error_file_name = argv[2];
This should have an argc check, for when you run the program
manually from the command line, with no args, for example.

(I'd have split this change out to that new not yet submitted test you
mention -- what if review of that new test finds a different approach
would be better?  No big harm done in this case, so okay.)

This new test need to get a tracefile by executing tfile.exe, but in order to avoid the race (this test is using basic.tf while tfile.exp is deleting basic.tf), I need the same tracefile with different name. Anyway, it will be clear as the new test is submitted.


>+# Copy tracefile from target to host.
>+remote_download host [remote_upload target b.tf ] basic.tf
>+remote_download host [remote_upload target e.tf ] error.tf
Spurious spaces before ']'.  But, what's going on here?
The target produces b.tf, and e.tf.  Then those are copied
to the host with remote_upload.  And then copied again
to the host, as basic.tf, and error.tf.  Why this juggling?


IIUC, dejagnu is running on machine 'build', so 'remote_upload target b.tf' copies b.tf from target to build, instead of host, and then we have to use 'remote_download' to copy file from build to host.


--
Yao


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