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]

[PATCH v2] Add autoload-breakpoints [1/6] ReportAsync


Hi,

To make the remote stub control the autoload-breakpoints in GDB part. I add ReportAsync function.
I think there must somebody ask me how different ReportAsync Packets and Notification Packets. There are some introduce:


1. The Notification should happen when GDB RSP package just send to the stub.
But ReportAsync should not. ReportAsync need do a shake hands with GDB first. So when this is not the right time to handle the control packat from the stub (for example: when gdb just send a packet to remote, do a another control maybe affect gdb). GDB can ignore this shake hands directly. Then the stub can give up this operation and wait for the another time try again.
With this support, we can let the stub use ReportAsync do some spcial operation to GDB.


2. Because after shake hands, another package will translate with ack, it will be more safe in some remote infterface then Notification.

Thanks,
Hui

2012-04-11 Hui Zhu <hui_zhu@mentor.com>

	* remote.c (inside_reportasync_handler): New variable.
	(remote_reportasync_handler): New function.
	(async_client_callback): Move to the top.
	(async_client_context): Ditto.
	(remote_async_serial_handler): Ditto.
	(PACKET_ReportAsync): new enum.
	(remote_pr): Add PACKET_ReportAsync.
	(remote_open_1): Call serial_async.
	(readchar_buffer_ch): New variable.
	(readchar): If need, return the value of readchar_buffer_ch.
	(readchar_buffer_put): New function.
	(putpkt_binary): Add check for inside_reportasync_handler.
	Add handle for '^'.
	(getpkt_or_notif_sane_1): Add handle for '^'.
	(remote_is_async_p): Add check for PACKET_ReportAsync.
	(remote_reportasync_check): New function.
	(remote_async_serial_handler): Call remote_reportasync_check.
	(remote_async): Add check for PACKET_ReportAsync.
	(_initialize_remote): Add PACKET_ReportAsync.

Attachment: report.txt
Description: Text document


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