Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.embedded > #537
| From | jeffj@panix.com (Jeff Jonas) |
|---|---|
| Newsgroups | comp.os.linux.embedded |
| Subject | Re: Reading power PC MPC 8260 program counter (Next Instruction address) |
| Date | 2011-02-11 03:31 -0500 |
| Organization | Jeff's House of Electronic Parts |
| Message-ID | <ij2s4o$lv7$1@panix5.panix.com> (permalink) |
| References | <OcadnWOytc0SFczQ4p2dnAA@giganews.com> <5O-dnRBA-e3rFM_QnZ2dnUVZ8vudnZ2d@lyse.net> <7429c9ef-5603-45fc-a1db-abf32c436f6e@k38g2000vbn.googlegroups.com> <OfednQeFWbJgKM_QnZ2dnUVZ7tOdnZ2d@lyse.net> |
Perhaps I'm being rather naive about the situation
but unless you're trying to get the address after memory mapping
and/or virtual memory translation, won't
&(main)
give the address of main(),
enough to determine if it's in RAM or ROM in an embedded system?
Profiling system calls & libraries such as profil(3)
give indirect access to the program counter.
Try as I might, I don't see a way to access the program counter
even via a signal handler since the return address is on the stack-frame
which is not usually accessible (but can be via stack-variable tricks).
Back to comp.os.linux.embedded | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Reading power PC MPC 8260 program counter (Next Instruction address) David Brown <david@westcontrol.removethisbit.com> - 2011-02-09 13:32 +0100
Re: Reading power PC MPC 8260 program counter (Next Instruction address) Lew Pitcher <lpitcher@teksavvy.com> - 2011-02-09 07:01 -0800
Re: Reading power PC MPC 8260 program counter (Next Instruction address) David Brown <david@westcontrol.removethisbit.com> - 2011-02-09 16:44 +0100
Re: Reading power PC MPC 8260 program counter (Next Instruction address) Lew Pitcher <lpitcher@teksavvy.com> - 2011-02-09 06:16 -0800
Re: Reading power PC MPC 8260 program counter (Next Instruction address) David Brown <david@westcontrol.removethisbit.com> - 2011-02-09 16:42 +0100
Re: Reading power PC MPC 8260 program counter (Next Instruction address) Niklas Holsti <niklas.holsti@tidorum.invalid> - 2011-02-12 09:35 +0100
Re: Reading power PC MPC 8260 program counter (Next Instruction address) Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2011-02-12 10:06 +0200
Re: Reading power PC MPC 8260 program counter (Next Instruction address) jeffj@panix.com (Jeff Jonas) - 2011-02-11 03:31 -0500
csiph-web