aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-disasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui/tui-disasm.c')
-rw-r--r--gdb/tui/tui-disasm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index f86c216..70ee907 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -99,8 +99,7 @@ tui_find_disassembly_address (struct gdbarch *gdbarch, CORE_ADDR pc, int from)
if (max_lines <= 1)
return pc;
- asm_lines = (struct tui_asm_line*) alloca (sizeof (struct tui_asm_line)
- * max_lines);
+ asm_lines = XALLOCAVEC (struct tui_asm_line, max_lines);
memset (asm_lines, 0, sizeof (struct tui_asm_line) * max_lines);
new_low = pc;
@@ -198,8 +197,7 @@ tui_set_disassem_content (struct gdbarch *gdbarch, CORE_ADDR pc)
hilite. */
/* Get temporary table that will hold all strings (addr & insn). */
- asm_lines = (struct tui_asm_line*) alloca (sizeof (struct tui_asm_line)
- * max_lines);
+ asm_lines = XALLOCAVEC (struct tui_asm_line, max_lines);
memset (asm_lines, 0, sizeof (struct tui_asm_line) * max_lines);
tui_disassemble (gdbarch, asm_lines, pc, max_lines);