[patch v7 02/24] btrace: uppercase btrace_read_type

Markus Metzger
2013-11-29T14:40:28Z

* common/btrace-common.h (btrace_read_type)<btrace_read_all>:
Change to ...
(btrace_read_type)<BTRACE_READ_ALL>: ... this. Update users.
(btrace_read_type)<btrace_read_new>: Change to ...
(btrace_read_type)<BTRACE_READ_NEW>: ... this. Update users.

---
gdb/btrace.c | 2 +-
gdb/common/btrace-common.h | 4 ++--
gdb/common/linux-btrace.c | 2 +-
gdb/gdbserver/server.c | 4 ++--
gdb/remote.c | 4 ++--
5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gdb/btrace.c b/gdb/btrace.c
index 3230a3e..46e73db 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -401,7 +401,7 @@ btrace_fetch (struct thread_info *tp)
if (btinfo->target == NULL)
return;

- btrace = target_read_btrace (btinfo->target, btrace_read_new);
+ btrace = target_read_btrace (btinfo->target, BTRACE_READ_NEW);
if (VEC_empty (btrace_block_s, btrace))
return;

diff --git a/gdb/common/btrace-common.h b/gdb/common/btrace-common.h
index b157c7c..1986868 100644
--- a/gdb/common/btrace-common.h
+++ b/gdb/common/btrace-common.h
@@ -64,10 +64,10 @@ struct btrace_target_info;
enum btrace_read_type
{
/* Send all available trace. */
- btrace_read_all,
+ BTRACE_READ_ALL,

/* Send all available trace, if it changed. */
- btrace_read_new
+ BTRACE_READ_NEW
};

#endif /* BTRACE_COMMON_H */
diff --git a/gdb/common/linux-btrace.c b/gdb/common/linux-btrace.c
index 2e0cd8e..aa2b0ae 100644
--- a/gdb/common/linux-btrace.c
+++ b/gdb/common/linux-btrace.c
@@ -509,7 +509,7 @@ linux_read_btrace (struct btrace_target_info *tinfo,
unsigned long data_head, retries = 5;
size_t buffer_size;

- if (type == btrace_read_new && !linux_btrace_has_changed (tinfo))
+ if (type == BTRACE_READ_NEW && !linux_btrace_has_changed (tinfo))
return NULL;

header = perf_event_header (tinfo);
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index e0af785..1a110e0 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -1377,9 +1377,9 @@ handle_qxfer_btrace (const char *annex,
}

if (strcmp (annex, "all") == 0)
- type = btrace_read_all;
+ type = BTRACE_READ_ALL;
else if (strcmp (annex, "new") == 0)
- type = btrace_read_new;
+ type = BTRACE_READ_NEW;
else
{
strcpy (own_buf, "E.Bad annex.");
diff --git a/gdb/remote.c b/gdb/remote.c
index 186c058..7fe79d5 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -11434,10 +11434,10 @@ remote_read_btrace (struct btrace_target_info *tinfo,

switch (type)
{
- case btrace_read_all:
+ case BTRACE_READ_ALL:
annex = "all";
break;
- case btrace_read_new:
+ case BTRACE_READ_NEW:
annex = "new";
break;
default:
--
1.8.3.1