Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following t.c and ts.s files Under Linux, use gcc -m32 t.c ts.s to generate an a.out Run a.out as a.out one two three

image text in transcribed

image text in transcribed

Given the following t.c and ts.s files Under Linux, use gcc -m32 t.c ts.s to generate an a.out Run a.out as a.out one two three > outfile DO the requirements 1 to 5 as specified bel ow # ts.s file: getebp global getebp movl ret %ebp, %eax /xxxxxxxxxxxxx t.c filxxxxxxxxxxxxxxx*/ #include #include int FP: int main(int argc, char argv ], char env ]) int a,b,c; printf("enter mainn"); pr intf("&argc=%x argv=8x env-Xctin", &argc, argv, printf("&a-X8x8b-%8x &c-X8x n'', &a, &b, &c); env); (1). Write C code to pr int values of argc and argv[] entries a-1 b-2 A(a,b); c-3; printf("exit mainn"; int A(int x, int y) int d,e,f printf("enter An") // write C code to PRINT ADDRESS OF d, e, f B(d,e); printf("exit Atn"); int B(int x, int y) int g,h,i printf("enter B") // write C code to PRINT ADDRESS OF g,h, i C(g,h); printf("exit Bn"); int C(int x, int y) int u, v, w, i, p; printf("enter Wn") // write C cdoe to PRINT ADDRESS OF u,v,w,i,p; FP (int )getebp); // FP stack frame pointer of the C) function (2). Write C code to print the stack frame ink list p = (int *)&p; (3). Print the stack contents from p to the frame of main) YOU MAY JUST PRINT 128 entries of the stack contents (4). On a hard copy of the print out, identify the stack contents as LOCAL VARIABLES, PARAMETERS, stack frame po inter of each function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions

Question

Understand human resource planning in an academic setting.

Answered: 1 week ago