This is the mail archive of the gdb@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: 7.7 Regression when loading a trace file


> -----Original Message-----
> From: Yao Qi [mailto:yao@codesourcery.com]
> Sent: Wednesday, January 29, 2014 9:35 AM
> To: Marc Khouzam
> Cc: 'gdb@sourceware.org'
> Subject: Re: 7.7 Regression when loading a trace file
> 
> On 01/29/2014 09:59 PM, Marc Khouzam wrote:
> > Hi guys,
> >
> > sorry for the late message but I just noticed a regression with the
> proposed 7.7 when loading a tracefile.  The created inferior no longer has an
> execution (no pid, no thread), and no MI execution event is seen anymore
> (=thread-group-started or =thread-created).  So, I cannot load a trace file in
> Eclipse anymore.
> >
> 
> I had a change on this area
> 
>   [RFC] Don't create inferior in tfile target.
>   https://sourceware.org/ml/gdb-patches/2013-05/msg00068.html
> 
> but not sure it is the causer.  I'll dig deep tomorrow.
> 
> What MI output is needed for Eclipse to load a trace file successfully?
> =thread-group-started and =thread-created?

The trace file processing is based on the core file one, which shows
the execution tree after the core file is loaded.
But reading your mail makes me think that it makes sense that
when loading a trace file there would be no inferior or thread yet.
However, when selecting a trace record, then we would need
to see the inferior and thread.  This is not the case with 7.7.

To me, trace records are like a limited core file:
a snapshot of a specific point of the execution.  So, when looking
at a trace record, just like when looking at a core file, we want
to show the execution hierarchy, i.e., the process and thread
where the record was collected.

With 7.7 there is no inferior or thread at all, even after selecting
a trace file.

Does that approach make more sense?


> 
> >
> > Broken session:
> >
> >> gdb.7.7 -i mi ~/runtime-TestDSF/Producer/Debug/Producer
> > =thread-group-added,id="i1"
> > ~"GNU gdb (GDB) 7.7.50.20140128-cvs\n"
> > (gdb)
> > target tfile /tmp/trace1
> > &"target tfile /tmp/trace1\n"
> > =tsv-created,name="trace_timestamp",initial="0"\n
> > [...]
> >
> > ========== no MI event about a process or thread  ================
> >
> 
> Since GDB opens a trace file, instead of a live inferior, it is reasonable to me
> that no thread is created.
> 
> > ^done
> > (gdb)
> > -list-thread-groups
> >
> ^done,groups=[{id="i1",type="process",executable="/home/lmckhou/runti
> m
> > e-TestDSF/Producer/Debug/Producer"}]
> >
> > ================= No pid field ======================
> 
> Likewise, it is reasonable to me that there is no pid field.
> 
> >
> > Working session:
> >
> >> gdb.7.6 -i mi ~/runtime-TestDSF/Producer/Debug/Producer
> > =thread-group-added,id="i1"
> > ~"GNU gdb (GDB) 7.6.1\n"
> > (gdb)
> > target tfile /tmp/trace
> > &"target tfile /tmp/trace\n"
> > =thread-group-started,id="i1",pid="1"
> > =thread-created,id="1",group-id="i1"
> >
> > ============= Notice the above two MI events ====================
> >
> > =tsv-created,name="trace_timestamp",initial="0"\n
> > ^done
> > (gdb)
> > -list-thread-groups
> >
> ^done,groups=[{id="i1",type="process",pid="1",executable="/home/lmckh
> o
> > u/runtime-TestDSF/Producer/Debug/Producer"}]
> >
> > ============= Notice the pid field ==================
> >
> 
> --
> Yao (éå)

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