Use Linux executable objectCode5 for this question. These files are on syccuxas01.pcc.edu in directory ~michael.trigoboff/cs201/quiz02LinuxFiles. The file is run from the Linux command line, and takes one positive numerical argument, like this: ./objectCode5 3 (You can enter any small positive integer instead of 3.) Command line arguments are passed to int main(int argc, char** argv) as arguments argc and argv. You should assume that argc is at ebp+8 and argv is at ebp+12. This code contains a function named what. Using gdb, figure out what the function named what computes: Question options: 1) the absolute value of n 2) n squared 3) the sum of the integers from 1 through n 4) factorial of n
Use Linux executable objectCode5 for this question. These files are on syccuxas01.pcc.edu in directory ~michael.trigoboff/cs201/quiz02LinuxFiles. The file is run from the Linux command line, and takes one positive numerical argument, like this: ./objectCode5 3 (You can enter any small positive integer instead of 3.) Command line arguments are passed to int main(int argc, char** argv) as arguments argc and argv. You should assume that argc is at ebp+8 and argv is at ebp+12. This code contains a function named what. Using gdb, figure out what the function named what computes: Question options: 1) the absolute value of n 2) n squared 3) the sum of the integers from 1 through n 4) factorial of n
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Use Linux executable objectCode5 for this question. These files are on syccuxas01.pcc.edu in directory ~michael.trigoboff/cs201/quiz02LinuxFiles.
The file is run from the Linux command line, and takes one positive numerical argument, like this:
./objectCode5 3
(You can enter any small positive integer instead of 3.)
Command line arguments are passed to int main(int argc, char** argv) as arguments argc and argv. You should assume that argc is at ebp+8 and argv is at ebp+12.
This code contains a function named what. Using gdb, figure out what the function named what computes:
Question options:
|
|
||
|
|
||
|
|
||
|
|

Transcribed Image Text:Оx804847f <main>
Оx8048483 <main+4>
ex8048486 <main+7> _pushl -0x4(%ecx)
Өx8048489 <main+10> push
Оx804848а <main+11> mov
Оx804848с <main+13> push
Ox804848d <main+14> push
Оx804848е <main+15> sub
Оx8048491 <main+18> mov
Өx8048493 <main+20> cmpl
Оx8048496 <main+23> je
Оx8048498 <main+25> sub
Оx804849b <main+28> рush
Оx80484а0 <main+33> сall
Оx80484a5 <main+38> add
Оx80484a8 <main+41> mov
Оx80484ad <main+46> jmp
Оx80484af <main+48> mov
Оx80484b2 <main+51> add
Оx80484b5 <main+54> mov
Оx80484b7 <main+56> sub
Өx4(%esp),%eсх
$0xfffffff0,%esp
lea
and
%ebp
%esp,%ebp
%ebx
%есх
$0x10,%esp
%есх,%eax
$0x2, (%eax)
Оx80484af <main+48>
$0xc,%esp
$0x8048580
Оx8048310 <puts@plt>
$0x10,%esp
$0xffffffff ,%eax
Оx80484db <main+92>
Өx4(%eax),%eax
$0x4,%eax
(%eax),%eax
$0xc,%esp

Transcribed Image Text:Ox80484c0 <main+65>
Ox80484c3 <main+68>
Ox80484c5 <main+70>
Ox80484c7 <main+72>
Ox80484ca <main+75>
Ox80484cb <main+76>
x80484d0 <main+81>
Ox80484d3 <main+84>
Ox80484d6 <main+87>
Ox80484db <main+92>
Ox80484de <main+95>
Ox80484df <main+96>
Ox80484e0 <main+97>
Ox80484e1 <main+98>
Ox80484e4 <main+101>
$0x10,%esp
%eax,%ebx
%ebx,%eax
$0xc,%esp
add
mov
mov
sub
push
%eax
call
Ox804844c <what>
$0x10,%esp
%eax,-0xc(%ebp)
$0x0,%eax
-0x8(%ebp),%esp
add
mov
mov
lea
pop
%ecx
pop
%ebx
pop
lea
%ebp
-0x4(%eсx),%esp
ret
Yoha
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education