Skip to content
Snippets Groups Projects
Commit b1694b3d authored by Brandon Rodriguez's avatar Brandon Rodriguez
Browse files

Add final turn in script to main directory (is also in documents)

parent 28afad6b
Branches
No related merge requests found
Script started on Mon 03 Oct 2016 08:35:34 PM EDT
]0;brodriguez8774@MobileBadger: /media/brodriguez8774/DEVUSB/BACKUPS/16-10-02_DevLaptop/CS2230/a4brodriguez8774@MobileBadger:/media/brodriguez8774/DEVUSB/BACKUPS/16-10-02_DevLaptop/CS2230/a4$ make debug
( mspdebug rf2500 "gdb" 1>/dev/null & ); msp430-gdb main.elf -ex "target remote :2000"
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=msp430".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /media/brodriguez8774/DEVUSB/BACKUPS/16-10-02_DevLaptop/CS2230/a4/main.elf...done.
rf2500: warning: can't detach kernel driver: No data available
fet: FET returned error code 4 (Could not find device or device not supported)
fet: command C_IDENT1 failed
fet: FET returned NAK
warning: device does not support power profiling
Remote debugging using :2000
_reset_vector__ () at ../../../gcc/gcc/config/msp430/crt0.S:105
105 ../../../gcc/gcc/config/msp430/crt0.S: No such file or directory.
in ../../../gcc/gcc/config/msp430/crt0.S
(gdb) b main.c:main
Breakpoint 1 at 0xc042: file main.c, line 7.
(gdb) continue
Continuing.
Breakpoint 1, main () at main.c:7
7 WDTCTL = WDTHOLD | WDTPW;
(gdb) step
8 BCSCTL1 = CALBC1_1MHZ;
(gdb) step
9 DCOCTL = CALDCO_1MHZ;
(gdb) step
11 P1DIR = 0b00000001;
(gdb) info register
pc/r0: c058 sp/r1: 03f0 sr/r2: 0001 r3: 0000
fp/r4: 0402 r5: 5a08 r6: d738 r7: 4e63
r8: 8ab3 r9: f19f r10: 9e8f r11: e968
r12: 37af r13: c61e r14: 0069 r15: 006d
(gdb) x &c058
No symbol "c058" in current context.
(gdb) x $c058
0x0: 0x4a0e4000
(gdb) info pc/r0
Undefined info command: "pc/r0". Try "help info".
(gdb) p $r0
$1 = (void (*)()) 0xc058 <main+26>
(gdb) p $r0
No symbol "r0" in current context.
(gdb) p &r0
No symbol "pc" in current context.
(gdb) p &pc/r0
No symbol "r0" in current context.
(gdb) step
12 P1OUT = 0b00000001;
(gdb) info register
pc/r0: c05c sp/r1: 03f0 sr/r2: 0001 r3: 0000
fp/r4: 0402 r5: 5a08 r6: d738 r7: 4e63
r8: 8ab3 r9: f19f r10: 9e8f r11: e968
r12: 37af r13: c61e r14: 0069 r15: 006d
(gdb) p &P1OUT
Address of symbol "P1OUT" is unknown.
(gdb) p P1OUT
Address of symbol "P1OUT" is unknown.
(gdb) x P1OUT
Address of symbol "P1OUT" is unknown.
(gdb) x &P1OUT
Address of symbol "P1OUT" is unknown.
(gdb) x $P1OUT
0x0: 0x4a0e4000
(gdb) x $P1DIR
0x0: 0x4a0e4000
(gdb)
0x4: 0x4a4a4a4a
(gdb) ???
Undefined command: "". Try "help".
(gdb) step
19 a = (char) 65;
(gdb) info register
pc/r0: c060 sp/r1: 03f0 sr/r2: 0001 r3: 0000
fp/r4: 0402 r5: 5a08 r6: d738 r7: 4e63
r8: 8ab3 r9: f19f r10: 9e8f r11: e968
r12: 37af r13: c61e r14: 0069 r15: 006d
(gdb) $c060
$2 = void
(gdb) &c060
No symbol "c060" in current context.
(gdb) p $2
$3 = void
(gdb) x $1
0x0: 0x4a0e4000
(gdb) x $0c060
0x0: 0x4a0e4000
(gdb) info line main.c:19
Line 19 of "main.c" starts at address 0xc060 <main+34> and ends at 0xc066 <main+40>.
(gdb) step
20 b = (char) 126;
(gdb) p &b
$4 = 0x3f5 "AA itrSng"
(gdb) p &a
$5 = 0x3f4 "AAA itrSng"
(gdb) info register
pc/r0: c066 sp/r1: 03f0 sr/r2: 0001 r3: 0000
fp/r4: 0402 r5: 5a08 r6: d738 r7: 4e63
r8: 8ab3 r9: f19f r10: 9e8f r11: e968
r12: 37af r13: c61e r14: 0069 r15: 006d
(gdb) step
21 i = swap(&a, &b);
(gdb) info register
pc/r0: c06c sp/r1: 03f0 sr/r2: 0001 r3: 0000
fp/r4: 0402 r5: 5a08 r6: d738 r7: 4e63
r8: 8ab3 r9: f19f r10: 9e8f r11: e968
r12: 37af r13: c61e r14: 0069 r15: 006d
(gdb) step
swap (ptr1=0x3f4 "A~A itrSng", ptr2=0x3f5 "~A itrSng") at swap.c:5
5 tmp = *ptr1;
(gdb) info register
pc/r0: c0ee sp/r1: 03e6 sr/r2: 0001 r3: 0000
fp/r4: 0402 r5: 5a08 r6: d738 r7: 4e63
r8: 8ab3 r9: f19f r10: 9e8f r11: e968
r12: 37af r13: c61e r14: 03f5 r15: 03f4
(gdb) step
6 *ptr1 = *ptr2;
(gdb) info register
pc/r0: c0f6 sp/r1: 03e6 sr/r2: 0001 r3: 0000
fp/r4: 0402 r5: 5a08 r6: d738 r7: 4e63
r8: 8ab3 r9: f19f r10: 9e8f r11: e968
r12: 37af r13: c61e r14: 03f5 r15: 03f4
(gdb) info line swap.c:5
Line 5 of "swap.c" starts at address 0xc0ee <swap+10> and ends at 0xc0f6 <swap+18>.
(gdb) step
7 *ptr2 = tmp;
(gdb) step
9 i = -42;
(gdb) step
10 return i;
(gdb) step
11 }
(gdb) step
main () at main.c:23
23 char *str = "A String";
(gdb) p &str
$6 = (char **) 0x3f2
(gdb) step
24 char str_array[9] = { 'A', ' ', 'S', 't', 'r', 'i', 'n', 'g', (char) 0 };
(gdb) p $str_array
$7 = void
(gdb) &str_array
$8 = (char (*)[9]) 0x3f6
(gdb) p &"A String";
Invalid character ';' in expression.
(gdb) p &"A String"
evaluation of this expression requires the program to have a function "malloc".
(gdb) info line main.c:24
Line 24 of "main.c" starts at address 0xc084 <main+70> and ends at 0xc0b8 <main+122>.
(gdb) p 23
$9 = 23
(gdb) p $9
$10 = 23
(gdb) x $9
0x17: 0x00ff00d6
(gdb) &ptr
No symbol "ptr" in current context.
(gdb) p &ptr1
Can't take address of "ptr1" which isn't an lvalue.
(gdb) step
26 i = swap(&str_array[2], &str_array[5]);
(gdb) info register
pc/r0: c0b8 sp/r1: 03f0 sr/r2: 0000 r3: 0000
fp/r4: 0402 r5: 5a08 r6: d738 r7: 4e63
r8: 8ab3 r9: f19f r10: 9e8f r11: e968
r12: 37af r13: c61e r14: 007e r15: ffd6
(gdb) step
swap (ptr1=0x3f8 "String", ptr2=0x3fb "ing") at swap.c:5
5 tmp = *ptr1;
(gdb) info register
pc/r0: c0ee sp/r1: 03e6 sr/r2: 0001 r3: 0000
fp/r4: 0402 r5: 5a08 r6: d738 r7: 4e63
r8: 8ab3 r9: f19f r10: 9e8f r11: e968
r12: 37af r13: c61e r14: 03fb r15: 03f8
(gdb) p &ptr1
$11 = (char **) 0x3ea
(gdb) step
6 *ptr1 = *ptr2;
(gdb) info register
pc/r0: c0f6 sp/r1: 03e6 sr/r2: 0001 r3: 0000
fp/r4: 0402 r5: 5a08 r6: d738 r7: 4e63
r8: 8ab3 r9: f19f r10: 9e8f r11: e968
r12: 37af r13: c61e r14: 03fb r15: 03f8
(gdb) p &ptr1
$12 = (char **) 0x3ea
(gdb) step
7 *ptr2 = tmp;
(gdb) info register
pc/r0: c104 sp/r1: 03e6 sr/r2: 0001 r3: 0000
fp/r4: 0402 r5: 5a08 r6: d738 r7: 4e63
r8: 8ab3 r9: f19f r10: 9e8f r11: e968
r12: 37af r13: c61e r14: 0069 r15: 03f8
(gdb) p &str_array[2]
No symbol "str_array" in current context.
(gdb) step
9 i = -42;
(gdb) step
10 return i;
(gdb) step
11 }
(gdb) step
main () at main.c:28
28 return 0;
(gdb) p &str_array[2]
$13 = 0x3f8 "itrSng"
(gdb) p &str_array[5]
$14 = 0x3fb "Sng"
(gdb) Quit
A debugging session is active.
Inferior 1 [Remote target] will be killed.
Quit anyway? (y or n) Y
]0;brodriguez8774@MobileBadger: /media/brodriguez8774/DEVUSB/BACKUPS/16-10-02_DevLaptop/CS2230/a4brodriguez8774@MobileBadger:/media/brodriguez8774/DEVUSB/BACKUPS/16-10-02_DevLaptop/CS2230/a4$ exit
exit
Script done on Mon 03 Oct 2016 09:00:14 PM EDT
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment