我需要为C ++代码开发一个Unix调试器

问题描述:

我正在使用在unix中开发和维护的c ++代码.我需要开发一个基于UI的调试器,例如Visual Studio,这将帮助我更快地进行调试,并提供所有信息,例如堆栈框架,监视等.我们目前有GDB可以在unix中调试代码.但它对开发人员不友好.因此,我正在寻找一些开放源代码,可以在其上添加一些插件以使其具有具有良好UI的调试器,这也将极大地帮助我理解代码流.

问候,Deepika.

I am working in c++ code that is developed and maintained in unix. I need to develop a UI based debugger something like visual studio which will help me in faster debugging and provides all information like stack frame, watch etc. We currently have GDB to debug code in unix.But it is not developer friendly. So I am looking for some open source upon which I can have some add-on to have a debugger with good UI and that will help me greatly in understanding the code flow as well.

Regards, Deepika .

看,我要直接问一下..

您实际上有自己的代码和经验吗?还是您想了解_sother网站的工作原理?

您熟悉AJAX吗? (异步JavaScript和Xml)

除了Flash Player之类的插件外,客户端计算机上不执行任何C ++代码.这一切都发生在服务器上.即使那样,大多数情况下,本机运行的也只有XAMPP或ASP.NET,其他一切都是脚本,例如ASP,VBScript,PHP.

这就是页面刷新/更新其内容的方式.
1)用户单击按钮以执行某事"
2)网页上的JavaScript对此点击做出了响应.
3)Javascript向服务器发送请求以获取相关信息
4)服务器找到信息,发送回复
5)页面上的Javascript接收信息
6)页面上的Javascript更新/添加具有新信息的页面内容.

我创建了一个网页来查看我所在大学的学生时间表.时间表保存在(Windows)本机应用程序内部的数据库中.此应用程序通过COM公开了功能.

加载网页后,发送了AJAX请求,要求提供所有学生ID的列表.响应是包含所有ID的ListBox所需的HTML形式.

然后,当您选择一个学生&点击获取时间表",网页上的Javascript从列表框中获取了所选项目的索引.然后,使用此索引从列表框中获取文本(学生的ID).对于此示例,假设ID = 12345678从那里,它发送了一个请求,以检索位于"textTimetable.php?id = 12345678& type = student"的页面
因为它是一个PHP页面,所以它不仅像HTML页面或图像一样从服务器喷涌而出,还需要检查和执行.然后,文件textTimetable.php看起来它具有变量"id"和"type",然后创建一个COM对象,使其可以与时间表计划软件(Scientia的Syllabus Plus)进行通信.他们的课程清单(及其时间/天数).从那里开始,它在开始打印类之前,按开始时间对类进行排序,每个类都在单独的行上. :phe!满口的:

从textTimetable.php收到响应后,它将作为目标容器的innerHTML插入HTML页面上.

我也有pdfTimetable.php和pngTimetable.php-它们基本上与textTimetable.php相同,只是它们返回的内容的确切格式不同.无论我要HTML表格,PNG还是(嵌入式)PDF,这基本上都是相同的过程-尽管与插入页面的方式略有不同. HTML可以用作DIV的innerHTML,PNG(的URL)设置为页面上图像的URL,而PDF则设置为IFrame的源.
我知道在服务器上运行PHP时,无法对其进行视觉调试.当然是Javascript.


现在, 如果 您的应用正在扮演Syllabus Plus的角色-您将需要附加到进程-页面上的某些操作导致调用您的代码后,并且仍在运行.完成后,将暂停执行并开始单步执行.


啊哈!找到了.这是网页上单击"GetClassList"按钮时调用的Javascript.另外,它是请求的PHP页面的内容.
(伙计,这是一个很累的答案.以为我需要一杯咖啡或4杯和6包V):D
Look, I''m just going to come straight out and ask..

Do you actually have any of your own code and experience? OR Are you trying to understand how _someone else''s_ website works?

Are you familiar with AJAX? (Asynchronous JavaScript And Xml)

Except for plugins like Flash Player, there is no C++ code executed on the client machine. It all happens on the server. Even then, there is most often nothing other than XAMPP or ASP.NET running natively, everything else is a script like ASP, VBScript, PHP.

That is how pages refresh/update their content.
1) User clicks button to do ''something''
2) JavaScript on the webpage responds to this click.
3) Javascript sends request to server for relevant information
4) Server finds information, sends reply
5) Javascript on the page receives information
6) Javascript on page updates/adds the page contents with the new info.

I created a webpage for viewing Student timetables at a college I worked at. The timetables were held inside a database that was internal to a (Windows) native application. This application exposed functionality via COM.

When the web-page was loaded, an AJAX request was sent, that asked for a list of all the student IDs. The response was in the form of the HTML needed for a ListBox that contained all of the IDs.

Then, when you selected a student & hit "Get Timetable", Javascript on the webpage got the selected item''s index from the ListBox. It then got the text(the student''s ID) from the ListBox using this index. For this example lets say ID=12345678 From there, it sent a request to retrieve the page located at "textTimetable.php?id=12345678&type=student"
Because it''s a PHP page, it doesn''t just get spewed out from the server like an HTML page or an image, it gets examined and executed. The file textTimetable.php then looks to see that it has the variables "id" and "type" it then creates a COM object that allows it to communicate with the Timetable Scheduling Software (Syllabus Plus by Scientia) It finds the relevant student, gets their list of classes(and their times/days). From there, it sorts the classes by start-time, before printing the classes out, each on a separate line. :phew! what a mouthful:

When the response is received from textTimetable.php it is inserted as the innerHTML of the target container on the HTML page.

I also have pdfTimetable.php and pngTimetable.php - these are essentially identical to textTimetable.php, with the exception of the exact format of the content they return. It is essentially same process whether I want an HTML table, a PNG or an (inline) PDF - albeit with minor differences to the way it''s inserted into the page. The HTML can just go as the innerHTML of a DIV, the (url of the) PNG get set as the URL of an image on the page, whereas the PDF gets set as the source of an IFrame.
I am aware of no means by which the PHP running on the server may be visually debugged as it is running. The Javascript, certainly.


Now then, if your app is filling the role of Syllabus Plus - you will need to Attach To Process - after some action on the page has caused your code to be called, and while it''s still running. Once done, one would pause execution and begin single-stepping.


Ah-hah! Found it. Here''s the Javascript on the web-page that is called when I hit the "GetClassList" button. Also, the content of the PHP page that it requests.
(Man, what a tiring answer. Think I need a coffee or 4 and a 6 pack of V) :D
//
//	handler for the button that displays the class list
//
function loadClassList()
{
	var actName, actId, dayNum, weekNum, dayStr, weekStr, str;
	var dayIn=byId("dayList"), weekIn=byId("weekList"), actIn=byId("actListDaily");
	weekNum = weekIn.options.selectedIndex;

	dayStr = dayIn.options[dayIn.options.selectedIndex].text;
	actName = actIn.options[actIn.options.selectedIndex].text;
	actId = actIn.options[actIn.options.selectedIndex].value;

	byId("blueHeaderBarTitle").innerHTML = actName;

	var day, week, str, isOk, url;

	dayNum = dayIn.options.selectedIndex;
	weekNum = weekIn.options.selectedIndex;

	// strip off the HASH symbol - it screws up the HTTP 'GET' process - we'l stick it back on at the  other end (getStudentList.php)
	actId = actId.replace("#", "");

	// request the SELECT list of the day's activities
	url = "getStudentList.php";
	url += "?dayNum="+dayNum;
	url += "&weekNum=" + weekNum;
	url += "&actId=" + actId;

	byId("classListHolder").innerHTML = '<div class="progBar2">LOADING</div>';
	myGetAjaxResponseWithCallback(byId("classListHolder"), url, function(){doScrollBars(byId("infoBoxHolder"));});
}





<?php


dayNum =


_GET [' dayNum'];
_GET['dayNum'];