aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2018-02-13 12:13:59 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2018-02-13 12:13:59 -0500
commit24b9144d4ba83d37751786b08b48ad62fb7aef26 (patch)
treee0f9e35df6adee04d1dfbde2f2192fd728de91b5 /gdb/defs.h
parentdb7bf1058d28b2b5e931c60435a13f6db15df6af (diff)
downloadgdb-24b9144d4ba83d37751786b08b48ad62fb7aef26.zip
gdb-24b9144d4ba83d37751786b08b48ad62fb7aef26.tar.gz
gdb-24b9144d4ba83d37751786b08b48ad62fb7aef26.tar.bz2
Use enum flags for flags passed to openp
gdb/ChangeLog: * defs.h (enum openp_flags): New enum. (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH): Move to enum openp_flags. (openp_flags): New enum flags. (openp): Change parameter type to openp_flags. * source.c (openp): Change parameter type to openp_flags. * cli/cli-cmds.c (find_and_open_script): Use openp_flags. * dwarf2read.c (try_open_dwop_file): Use openp_flags.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r--gdb/defs.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index 4fb2129..70389ad 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -342,11 +342,17 @@ extern const char *pc_prefix (CORE_ADDR);
/* From source.c */
/* See openp function definition for their description. */
-#define OPF_TRY_CWD_FIRST 0x01
-#define OPF_SEARCH_IN_PATH 0x02
-#define OPF_RETURN_REALPATH 0x04
-extern int openp (const char *, int, const char *, int, char **);
+enum openp_flag
+{
+ OPF_TRY_CWD_FIRST = 0x01,
+ OPF_SEARCH_IN_PATH = 0x02,
+ OPF_RETURN_REALPATH = 0x04,
+};
+
+DEF_ENUM_FLAGS_TYPE(openp_flag, openp_flags);
+
+extern int openp (const char *, openp_flags, const char *, int, char **);
extern int source_full_path_of (const char *, char **);