Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » patch Gdb_MI parser
Re: patch Gdb_MI parser [message #44569 is a reply to message #44533] Wed, 01 April 2015 19:27 Go to previous messageGo to previous message
omari is currently offline  omari
Messages: 265
Registered: March 2010
Experienced Member
Thanks you Mirek,

more investigation, the origine of the 1024 character per line is the AProcess::Read(String&), the internal buffer size of this function is 1024.

then the patch can be reverted, and replaced by this one:

in function
MIValue Gdb_MI2::ReadGdb(bool wait)

replace :
		dbg->Read(s);
		StringStream ss(s);



by
		String sc;
		do
		{
			s = "";
			dbg->Read(s);
			sc << s;
		}while(s.GetCount());
		
		StringStream ss(sc);



call dbg-Read() in a loop in order to read all available data.


I think it is interesting to add a function String AProcess::ReadAllAvailable(), or a global function String ReadAvailable(AProcess&).

this patch resolve the issue described in MIValue Gdb_MI2::MICmd( const char *cmdLine) as a comment:
	// consume previous output from gdb... don't know why sometimes
	// is there and gives problems to MI interface. We shall maybe
	// parse and store it somewhere
	ReadGdb(false);



with this patch, the call to ReadGdb(false) in not needed.


regards
omari.

[Updated on: Wed, 01 April 2015 19:31]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: apps built depends on libstdc++
Next Topic: [BUG?] MIValue
Goto Forum:
  


Current Time: Sat May 04 10:01:16 CEST 2024

Total time taken to generate the page: 0.02947 seconds