Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #8401
| From | Wouter Verhelst <w@uter.be> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: ARM - Assembly GNU Debugger Output Help |
| Date | 2018-03-06 19:04 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <vq13ne-4th.ln1@gangtai.grep.be> (permalink) |
| References | <1bb30a5f-1614-41a6-891b-67b42e00c16e@googlegroups.com> |
On 06-03-18 17:28, Ilias Abrams wrote: > Hi guys, I was wondering, I am running a simple Assembly example with GNU Debugger (GDB) on a RPI (ARM architecture). When I execute the command "info registers" I take the following output. > > (gdb) info registers > r0 0x1 1 > r1 0x7efff7b4 2130704308 > r2 0x7efff7bc 2130704316 > r3 0x10408 66568 > r4 0x1042c 66604 > r5 0x0 0 > r6 0x102e0 66272 > r7 0x0 0 > r8 0x0 0 > r9 0x0 0 > r10 0x76fff000 1996484608 > r11 0x0 0 > r12 0x7efff6e0 2130704096 > sp 0x7efff660 0x7efff660 > lr 0x76e8f678 1994978936 > pc 0x10408 0x10408 <main> > cpsr 0x60000010 1610612752 > > From the output I can see that some register's values are memory addresses. Am I correct? Probably some are, yes, but it's impossible to say. A general-purpose register holds a number. What the meaning of that number is, depends on the code that's running on the processor. It may be a memory address, but it may just as well be a numeric value that the code running on the processor is doing some calculations on. There are a few special-purpose registers (such as the stack pointer (sp) and program counter (pc)) which by virtue of their function must point to a memory address if the system is going to be doing anything useful; but beyond that, in order to interpret the value of the registers you need to inspect the code. Try using the "disassemble" command. By default, that will give a disassembled view of the function which the program is "currently" executing, which should give you some hint as to what the values mean. Beyond that, your guess is as good as mine.
Back to comp.programming | Previous | Next — Previous in thread | Find similar | Unroll thread
ARM - Assembly GNU Debugger Output Help Ilias Abrams <iliasabrams@gmail.com> - 2018-03-06 08:28 -0800 Re: ARM - Assembly GNU Debugger Output Help Wouter Verhelst <w@uter.be> - 2018-03-06 19:04 +0100
csiph-web