public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* xfer_memory instead of target_read_memory in gdbtk_dis_asm_read_m emory
@ 2003-05-05 19:12 Liang, James
  2003-05-05 21:09 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Liang, James @ 2003-05-05 19:12 UTC (permalink / raw)
  To: 'insight@sources.redhat.com'

Why is it that
gdbtk_dis_asm_read_memory uses xfer_memory instead of target_read_memory??
I see the documented assumption, but why is that
assumption made?


James

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: xfer_memory instead of target_read_memory in gdbtk_dis_asm_read_m emory
  2003-05-05 19:12 xfer_memory instead of target_read_memory in gdbtk_dis_asm_read_m emory Liang, James
@ 2003-05-05 21:09 ` Andrew Cagney
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2003-05-05 21:09 UTC (permalink / raw)
  To: Liang, James; +Cc: 'insight@sources.redhat.com'

> Why is it that
> gdbtk_dis_asm_read_memory uses xfer_memory instead of target_read_memory??
> I see the documented assumption, but why is that
> assumption made?

Performance.  Accessing the local executable's text section is faster 
than a remote target's memory.

However, the assumption has problems.  Insight can't disassemble stuff 
in the BSS section or on the stack.

GDB's gdb_disassemble() function was recent changed to not do this 
performance tweak, instead ``set trust read-only-sections on'' can be 
used.  Insight should also just use gdb_disassemble().

Andrew


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-05 21:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-05 19:12 xfer_memory instead of target_read_memory in gdbtk_dis_asm_read_m emory Liang, James
2003-05-05 21:09 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).