This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Remove harcoded constants in remote.c:watchpoint_to_Z_packet
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 14 Nov 2005 13:08:36 +0300
- Subject: [PATCH] Remove harcoded constants in remote.c:watchpoint_to_Z_packet
This is a trivial change replacing hardcoded constants with already existing
enumerators.
Changelog entry:
2005-11-14 Vladimir Prus <ghost@cs.msu.su>
* remote.c (watchpoint_to_Z_packet): Use values of Z_packet_type enum
instead of hardcoded integer literals.
Patch attached.
Index: remote.c
===================================================================
--- remote.c (revision 1696)
+++ remote.c (working copy)
@@ -4505,13 +4505,13 @@
switch (type)
{
case hw_write:
- return 2;
+ return Z_PACKET_WRITE_WP;
break;
case hw_read:
- return 3;
+ return Z_PACKET_READ_WP;
break;
case hw_access:
- return 4;
+ return Z_PACKET_ACCESS_WP;
break;
default:
internal_error (__FILE__, __LINE__,