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] 12843


On Tuesday 30 August 2011 17:02:33 ext Tom Tromey wrote:
> Jan> When you are already considering changes on the front end side has been
> Jan> discussed some replacement by D-Bus, ORBit2 or similar RPC protocol?
> 
> AndrÃ> Please, pretty please, don't go down that road.
> 
> I think this is easily done already without much help from us -- Python
> has a variety of RPC approaches out of the box, you could write up
> XMLRPC to our API pretty easily.
> 
> AndrÃ> I've been adding extra "MI style" output fields for all kind of data,
> AndrÃ> including structured and image data, for two years now, and  
> AndrÃ> escaping is _really_ not a problem.
> 
> Do you generate MI-compliant output from Python?  I'm curious.

Sort of. Originally it was fully compliant, then extra fields had been
added and additional commas became "legal" (to save a few cycles
for the check whether they are necessary). But it's still pretty MI-ish.

As short example:

  void test()
  {
    std::vector<int> l;
    l.push_back(1);
    l.push_back(2);
    l.push_back(3);
    dummyStatement(&l);  // <== Break here
  }

produces in the "expanded" state where all children are visible

  "data=[{iname=\"local.l\",name=\"l\",addr=\"0xbfffeea8\",numchild=\"3\",
  childtype=\"int\",childnumchild=\"0\",addrbase=\"0x80a99f0\",addrstep=\"0x4\",
  children=[{value=\"1\",},{value=\"2\",},{value=\"3\",},],
  type=\"std::vector<int, std::allocator<int> >\",value=\"<3 items>\",},,]\n"

That will be displayed as something like

	Name	Value	Type 
	l	<3 items>	vector<int>
	[0]	1	int
	[1]	2	int
	[2]	3	int

The childtype/childnumchild/addrbase/addrstep is mostly there to 
reduce the overhead of repetitive date in the childitems, iname is
similar to the current -var-info-path-expression.

Andre'


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