+2017-04-05 Pedro Alves <palves@redhat.com>
+
+ * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
+ * disasm.c (set_disassembler_options): Constify local.
+ * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
+
2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
PR gdb/21352
char *options = get_disassembler_options (gdbarch);
const char *style = "";
int len = 0;
- char *opt;
+ const char *opt;
FOR_EACH_DISASSEMBLER_OPTION (opt, options)
if (CONST_STRNEQ (opt, "reg-names-"))
char **disassembler_options = gdbarch_disassembler_options (gdbarch);
const disasm_options_t *valid_options;
char *options = remove_whitespace_and_extra_commas (prospective_options);
- char *opt;
+ const char *opt;
/* Allow all architectures, even ones that do not support 'set disassembler',
to reset their disassembler options to NULL. */
gdb_assert (disassembly_flavor == att_flavor
|| disassembly_flavor == intel_flavor);
- /* FIXME: kettenis/20020915: Until disassembler_options is properly
- constified, cast to prevent a compiler warning. */
- info->disassembler_options = (char *) disassembly_flavor;
+ info->disassembler_options = disassembly_flavor;
return print_insn_i386 (pc, info);
}
+2017-04-05 Pedro Alves <palves@redhat.com>
+
+ * dis-asm.h (disassemble_info) <disassembler_options>: Now a
+ "const char *".
+ (next_disassembler_option): Constify.
+
2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
* elf/common.h (PT_GNU_MBIND_NUM): New.
bfd_vma target2; /* Second target address for dref2 */
/* Command line options specific to the target disassembler. */
- char * disassembler_options;
+ const char *disassembler_options;
/* If non-zero then try not disassemble beyond this address, even if
there are values left in the buffer. This address is the address
extern int disassembler_options_cmp (const char *, const char *);
/* A helper function for FOR_EACH_DISASSEMBLER_OPTION. */
-static inline char *
-next_disassembler_option (char *options)
+static inline const char *
+next_disassembler_option (const char *options)
{
- char *opt = strchr (options, ',');
+ const char *opt = strchr (options, ',');
if (opt != NULL)
opt++;
return opt;
+2017-04-05 Pedro Alves <palves@redhat.com>
+
+ * arc-dis.c (parse_option, parse_disassembler_options): Constify.
+ * arm-dis.c (parse_arm_disassembler_options): Constify.
+ * ppc-dis.c (powerpc_init_dialect): Constify local.
+ * vax-dis.c (parse_disassembler_options): Constify.
+
2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
* riscv-dis.c (riscv_disassemble_insn): Change "_gp" to
/* Helper for parsing the options. */
static void
-parse_option (char *option)
+parse_option (const char *option)
{
if (CONST_STRNEQ (option, "dsp"))
add_to_decodelist (DSP, NONE);
/* Go over the options list and parse it. */
static void
-parse_disassembler_options (char *options)
+parse_disassembler_options (const char *options)
{
if (options == NULL)
return;
/* Parse the string of disassembler options. */
static void
-parse_arm_disassembler_options (char *options)
+parse_arm_disassembler_options (const char *options)
{
- char *opt;
+ const char *opt;
FOR_EACH_DISASSEMBLER_OPTION (opt, options)
{
break;
}
- char *opt;
+ const char *opt;
FOR_EACH_DISASSEMBLER_OPTION (opt, info->disassembler_options)
{
ppc_cpu_t new_cpu = 0;
there's no symbol table. Returns TRUE upon success, FALSE otherwise. */
static bfd_boolean
-parse_disassembler_options (char * options)
+parse_disassembler_options (const char *options)
{
const char * entry_switch = "entry:";