From patchwork Fri Oct 27 13:32:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 78611 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D8A5D385352B for ; Fri, 27 Oct 2023 13:32:28 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id E7BD93858298 for ; Fri, 27 Oct 2023 13:32:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E7BD93858298 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E7BD93858298 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698413536; cv=none; b=Noe1ihl+aJEf2aN7ZoeA8ZaqYa/eDP8QF9yb5Wshu0tXdulQVkvnLC2Dm+4mo4yjFvW4sG3u5ydAndCHFxaFjpsJrYZxQtZvjzbiDMi7kK9uaCoJGItyBa1IwZANbeYYeqLuii4D7uweTVrjm/yg33HjWN7bAWnmaQ4pBK8Vl5o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698413536; c=relaxed/simple; bh=4QLNi8FL/ihVcqkOUuuKvi7pof8rW421VuT6/HgQte0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=AEKh6Dx3DoYH0XWdauTHjR9JNgD/E95q0fbEL/3kDDWQNDYOZy7V7EcD9zG0YTzbsgkZs8ma1YdHKcPzKafcaiirxeM1t2hJvfnIFLY9kU2DndEX5CYjt+yQ6jlZUhv1jt96Zyca5ViofCZs1bIy00P4IEJm8/yJLKYziqXWhXk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost.localdomain (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id EABD51E00F; Fri, 27 Oct 2023 09:32:11 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [pushed] gdb: trim trailing spaces in i386-tdep.{c,h} Date: Fri, 27 Oct 2023 09:32:09 -0400 Message-ID: <20231027133210.59521-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1173.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Change-Id: I06c2e7c958c3451f00c70978538c1c2ad1b566df --- gdb/i386-tdep.c | 34 +++++++++++++++++----------------- gdb/i386-tdep.h | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) base-commit: 2029e13917d53d2289d3ebb390c4f40bd2112d21 diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 560f16aa0e32..1ddca2410fdf 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -146,7 +146,7 @@ static const char * const i386_mmx_names[] = static const char * const i386_byte_names[] = { - "al", "cl", "dl", "bl", + "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" }; @@ -389,7 +389,7 @@ i386_fpc_regnum_p (struct gdbarch *gdbarch, int regnum) if (I387_ST0_REGNUM (tdep) < 0) return 0; - return (I387_FCTRL_REGNUM (tdep) <= regnum + return (I387_FCTRL_REGNUM (tdep) <= regnum && regnum < I387_XMM0_REGNUM (tdep)); } @@ -1202,7 +1202,7 @@ i386_analyze_struct_return (CORE_ADDR pc, CORE_ADDR current_pc, cache->pc_in_eax = 1; return current_pc; } - + if (buf[1] == proto1[1]) return pc + 4; else @@ -1217,7 +1217,7 @@ i386_skip_probe (CORE_ADDR pc) pushl constant call _probe addl $4, %esp - + followed by pushl %ebp @@ -1277,7 +1277,7 @@ i386_analyze_stack_align (CORE_ADDR pc, CORE_ADDR current_pc, pushl -4(%reg) "andl $-XXX, %esp" can be either 3 bytes or 6 bytes: - + 0x83 0xe4 0xf0 andl $-16, %esp 0x81 0xe4 0x00 0xff 0xff 0xff andl $-256, %esp */ @@ -1328,7 +1328,7 @@ i386_analyze_stack_align (CORE_ADDR pc, CORE_ADDR current_pc, /* MOD must be binary 10 and R/M must be binary 100. */ if ((buf[2] & 0xc7) != 0x44) return pc; - + /* REG has register number. Registers in pushl and leal have to be the same. */ if (reg != ((buf[2] >> 3) & 7)) @@ -1473,7 +1473,7 @@ i386_match_insn_block (CORE_ADDR pc, struct i386_insn *insn_patterns) static i386_insn i386_frame_setup_skip_insns[] = { /* Check for `movb imm8, r' and `movl imm32, r'. - + ??? Should we handle 16-bit operand-sizes here? */ /* `movb imm8, %al' and `movb imm8, %ah' */ @@ -1548,11 +1548,11 @@ i386_skip_noop (CORE_ADDR pc) if (target_read_code (pc, &op, 1)) return pc; - while (check) + while (check) { check = 0; /* Ignore `nop' instruction. */ - if (op == 0x90) + if (op == 0x90) { pc += 1; if (target_read_code (pc, &op, 1)) @@ -1585,7 +1585,7 @@ i386_skip_noop (CORE_ADDR pc) } } } - return pc; + return pc; } /* Check whether PC points at a code that sets up a new stack frame. @@ -1694,7 +1694,7 @@ i386_analyze_frame_setup (struct gdbarch *gdbarch, if (limit <= pc) return limit; - /* Check for stack adjustment + /* Check for stack adjustment subl $XXX, %esp or @@ -1805,7 +1805,7 @@ i386_analyze_register_saves (CORE_ADDR pc, CORE_ADDR current_pc, %ebx (and sometimes a harmless bug causes it to also save but not restore %eax); however, the code below is willing to see the pushes in any order, and will handle up to 8 of them. - + If the setup sequence is at the end of the function, then the next instruction will be a branch back to the start. */ @@ -1858,7 +1858,7 @@ i386_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) || producer_is_icc_ge_19 (cust->producer ())))) return std::max (start_pc, post_prologue_pc); } - + cache.locals = -1; pc = i386_analyze_prologue (gdbarch, start_pc, 0xffffffff, &cache); if (cache.locals < 0) @@ -2369,7 +2369,7 @@ static const struct frame_unwind i386_epilogue_frame_unwind = i386_epilogue_frame_unwind_stop_reason, i386_epilogue_frame_this_id, i386_epilogue_frame_prev_register, - NULL, + NULL, i386_epilogue_frame_sniffer }; @@ -2451,7 +2451,7 @@ static const struct frame_unwind i386_stack_tramp_frame_unwind = i386_epilogue_frame_unwind_stop_reason, i386_epilogue_frame_this_id, i386_epilogue_frame_prev_register, - NULL, + NULL, i386_stack_tramp_frame_sniffer }; @@ -4710,7 +4710,7 @@ i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum, /* Get the ARGIth function argument for the current function. */ static CORE_ADDR -i386_fetch_pointer_argument (frame_info_ptr frame, int argi, +i386_fetch_pointer_argument (frame_info_ptr frame, int argi, struct type *type) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -5690,7 +5690,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache, ir.addr -= 1; goto no_support; } - for (regnum = X86_RECORD_REAX_REGNUM; + for (regnum = X86_RECORD_REAX_REGNUM; regnum <= X86_RECORD_REDI_REGNUM; regnum++) I386_RECORD_FULL_ARCH_LIST_ADD_REG (regnum); diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h index 34dc53db8d93..4283a52c9292 100644 --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h @@ -295,7 +295,7 @@ enum i386_regnum I386_FS_REGNUM, /* %fs */ I386_GS_REGNUM, /* %gs */ I386_ST0_REGNUM, /* %st(0) */ - I386_MXCSR_REGNUM = 40, /* %mxcsr */ + I386_MXCSR_REGNUM = 40, /* %mxcsr */ I386_YMM0H_REGNUM, /* %ymm0h */ I386_YMM7H_REGNUM = I386_YMM0H_REGNUM + 7, I386_BND0R_REGNUM,