[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Breakpoint on first instruction in program
From: |
Adam Beneschan |
Subject: |
Re: Breakpoint on first instruction in program |
Date: |
Wed, 20 Jun 2012 13:39:07 -0700 |
> I am using the following assembly language program (doNothingProg.s) for
> instruction purposes:
>
> .text
> .globl main
> .type main, @function
> main:
> pushq %rbp # save caller's frame pointer
> movq %rsp, %rbp # establish our frame pointer
> movl $0, %eax # return 0 to caller
> movq %rbp, %rsp # restore stack pointer
> popq %rbp # restore caller's frame pointer
> ret # back to caller
>
> I want to set a breakpoint at the first instruction (pushq %rbp) so
> students can see how the stack frame is created.
break *&main
-- Adam