This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Alpha/Tru64 maximum debuggable stack frame size


> 2010-04-22  Jerome Guitton  <guitton@adacore.com>
> 
> 	* alpha-tdep.c (INSN_OPCODE, MEM_RA, MEM_RB, MEM_DISP, BR_RA)
> 	(OPR_FUNCTION, OPR_HAS_IMMEDIATE, OPR_RA, OPR_RC, OPR_LIT): New macros.
> 	(lda_opcode, stq_opcode, bne_opcode, subq_opcode, subq_function):
> 	New constants.
> 	(alpha_heuristic_analyze_probing_loop): New function.
> 	(alpha_heuristic_frame_unwind_cache): In the prologue analysis, detect
> 	and handle cases when a stack probe loop is generated.
> 	* alpha-mdebug-tdep.c (alpha_mdebug_frameless): New function.
> 	(alpha_mdebug_max_frame_size_exceeded): New function.
> 	(alpha_mdebug_after_prologue): Use alpha_mdebug_frameless.
> 	(alpha_mdebug_frame_sniffer, alpha_mdebug_frame_base_sniffer):
>         Return 0 when the maximum debuggable frame size has been exceeded.

OK, with a few little corrections...

> +/* Return a non-null result if the function is frameless; zero otherwise.  */
                   ^^^^
Can you use zero instead of null when you mean integer 0. I noticed
a few places where this needs to be adjusted...

> +  return PROC_FRAME_REG (proc_desc) == ALPHA_SP_REGNUM
> +    && PROC_FRAME_OFFSET (proc_desc) == 0;

Can you add parentheses around the condition. It's not strictly necessary,
but it's part of the GNU style, because it helps code automatic formatters 
such as GNU indent.

    return (PROC_FRAME_REG (proc_desc) == ALPHA_SP_REGNUM
	    && PROC_FRAME_OFFSET (proc_desc) == 0);

> +  return PROC_FRAME_OFFSET (proc_desc) == 0
> +    && !alpha_mdebug_frameless (proc_desc);

Same here, please.

> +/* Instruction decoding. The notations for registers, immediates and opcodes

Missing second space after first period.

> +     If anything different is found, the function returns without
> +     changing PC and FRAME_SIZE. Otherwise, PC will point immediately

Likewise here.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]