C Programming:  Write a separate program that takes one command line argument indicating a binary stack file (e.g., stack.bin). Provide an appropriate error message in case of a missing filename or error opening it. The sample output is shown below that it must print out. Show the full code with the sample output being run in the terminal. There must be no errors at all.  Sample Output:  function: 0x5639db7fc2ca, caller: 0x7f8b8f372290, frame pointe

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

C Programming

Write a separate program that takes one command line argument indicating a binary stack file (e.g., stack.bin). Provide an appropriate error message in case of a missing filename or error opening it. The sample output is shown below that it must print out. Show the full code with the sample output being run in the terminal. There must be no errors at all. 

Sample Output: 

function: 0x5639db7fc2ca, caller: 0x7f8b8f372290, frame pointer: 0x7ffd23831070
stack frame: 0x7ffd23831080-0x7ffd23831070, time: 0.003484 (2158-5642)
address range                  initial    final
0x7ffd2383107f-0x7ffd2383107c: 00007f8b | 00007f8b
0x7ffd2383107b-0x7ffd23831078: 8f372290 | 8f372290
0x7ffd23831077-0x7ffd23831074: 00000000 | 00000000
0x7ffd23831073-0x7ffd23831070: 00000001 | 00000001

function: 0x5639db7fc1d9, caller: 0x5639db7fc2f3, frame pointer: 0x7ffd23831050
stack frame: 0x7ffd23831060-0x7ffd23831030, time: 0.002587 (2173-4760)
address range                  initial    final
0x7ffd2383105f-0x7ffd2383105c: 00005639 | 00005639
0x7ffd2383105b-0x7ffd23831058: db7fc2f3 | db7fc2f3
0x7ffd23831057-0x7ffd23831054: 00007ffd | 00007ffd
0x7ffd23831053-0x7ffd23831050: 23831070 | 23831070
0x7ffd2383104f-0x7ffd2383104c: bbc0f880 | bbc0f880
0x7ffd2383104b-0x7ffd23831048: 778a2800 | 778a2800
0x7ffd23831047-0x7ffd23831044: 00000000 | 03030303
0x7ffd23831043-0x7ffd23831040: 00000000 | 03030303
0x7ffd2383103f-0x7ffd2383103c: 00005639 | 03035639
0x7ffd2383103b-0x7ffd23831038: db7fc2ca | 89abcdef
0x7ffd23831037-0x7ffd23831034: 00007f8b | 0000000a
0x7ffd23831033-0x7ffd23831030: 8f372290 | 000186a0

function: 0x5639db7fc1d9, caller: 0x5639db7fc29d, frame pointer: 0x7ffd23831010
stack frame: 0x7ffd23831020-0x7ffd23830ff0, time: 0.001733 (3015-4748)
address range                  initial    final
0x7ffd2383101f-0x7ffd2383101c: 00005639 | 00005639
0x7ffd2383101b-0x7ffd23831018: db7fc29d | db7fc29d
0x7ffd23831017-0x7ffd23831014: 00007ffd | 00007ffd
0x7ffd23831013-0x7ffd23831010: 23831050 | 23831050
0x7ffd2383100f-0x7ffd2383100c: bbc0f880 | bbc0f880
0x7ffd2383100b-0x7ffd23831008: 778a2800 | 778a2800
0x7ffd23831007-0x7ffd23831004: 00007ffd | 02020202
0x7ffd23831003-0x7ffd23831000: 23831050 | 02020202
0x7ffd23830fff-0x7ffd23830ffc: 00007ffd | 02027ffd
0x7ffd23830ffb-0x7ffd23830ff8: 23831188 | 89abcdef
0x7ffd23830ff7-0x7ffd23830ff4: 00005639 | 0000000a
0x7ffd23830ff3-0x7ffd23830ff0: db7fc2f3 | 000186a0

function: 0x5639db7fc1d9, caller: 0x5639db7fc29d, frame pointer: 0x7ffd23830fd0
stack frame: 0x7ffd23830fe0-0x7ffd23830fb0, time: 0.000851 (3883-4734)
address range                  initial    final
0x7ffd23830fdf-0x7ffd23830fdc: 00005639 | 00005639
0x7ffd23830fdb-0x7ffd23830fd8: db7fc29d | db7fc29d
0x7ffd23830fd7-0x7ffd23830fd4: 00007ffd | 00007ffd
0x7ffd23830fd3-0x7ffd23830fd0: 23831010 | 23831010
0x7ffd23830fcf-0x7ffd23830fcc: bbc0f880 | bbc0f880
0x7ffd23830fcb-0x7ffd23830fc8: 778a2800 | 778a2800
0x7ffd23830fc7-0x7ffd23830fc4: 00007ffd | 01010101
0x7ffd23830fc3-0x7ffd23830fc0: 23831010 | 01010101
0x7ffd23830fbf-0x7ffd23830fbc: 00007ffd | 01017ffd
0x7ffd23830fbb-0x7ffd23830fb8: 23831188 | 89abcdef
0x7ffd23830fb7-0x7ffd23830fb4: 00005639 | 0000000a
0x7ffd23830fb3-0x7ffd23830fb0: db7fc29d | 000186a0

function: 0x5639db7fc1d9, caller: 0x5639db7fc2fd, frame pointer: 0x7ffd23831050
stack frame: 0x7ffd23831060-0x7ffd23831030, time: 0.000851 (4781-5632)
address range                  initial    final
0x7ffd2383105f-0x7ffd2383105c: 00005639 | 00005639
0x7ffd2383105b-0x7ffd23831058: db7fc2fd | db7fc2fd
0x7ffd23831057-0x7ffd23831054: 00007ffd | 00007ffd
0x7ffd23831053-0x7ffd23831050: 23831070 | 23831070
0x7ffd2383104f-0x7ffd2383104c: bbc0f880 | bbc0f880
0x7ffd2383104b-0x7ffd23831048: 778a2800 | 778a2800
0x7ffd23831047-0x7ffd23831044: 03030303 | 01010101
0x7ffd23831043-0x7ffd23831040: 03030303 | 01010101
0x7ffd2383103f-0x7ffd2383103c: 03035639 | 01015639
0x7ffd2383103b-0x7ffd23831038: 89abcdef | 89abcdef
0x7ffd23831037-0x7ffd23831034: 0000000a | 0000000a
0x7ffd23831033-0x7ffd23831030: 000186a0 | 000186a0

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Stack
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY