History log of /external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7463e49387b46e66b6612ff4b9683c612c92f804 26-Feb-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Include pub_core_aspacemgr.h only where needed.
Also fixes BZ #344235.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14966 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c
46cc04521acf2827eb33310fadc119bf2dc039e4 25-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r14202 from the BUF_REMOVAL branch to trunk.
This patch changes the interface and behaviour of VG_(demangle) and
VG_(maybe_Z_demangle). Instead of copying the demangled name into a
fixed sized buffer that is passed in from the caller (HChar *buf, Int n_buf),
the demangling functions will now return a pointer to the full-length
demangled name (HChar **result). It is the caller's responsiblilty to
make a copy if needed.

This change in function parameters ripples upward
- first: to get_sym_name
- then to the convenience wrappers
- VG_(get_fnname)
- VG_(get_fnname_w_offset)
- VG_(get_fnname_if_entry)
- VG_(get_fnname_raw)
- VG_(get_fnname_no_cxx_demangle)
- VG_(get_datasym_and_offset)

The changes in foComplete then forces the arguments of
- VG_(get_objname) to be changed as well

There are some issues regarding the ownership and persistence of
character strings to consider.
In general, the returned character string is owned by "somebody else"
which means the caller must not free it. Also, the caller must not
modify the returned string as it possibly points to read only memory.
Additionally, the returned string is not necessarily persistent. Here are
the scenarios:
- the returned string is a demangled function name in which case the
memory holding the string will be freed when the demangler is called again.
- the returned string hangs off of a DebugInfo structure in which case
it will be freed when the DebugInfo is discarded
- the returned string hangs off of a segment in the address space manager
in which case it may be overwritten when the segment is merged with
another segment
So the rule of thunb here is: if in doubt strdup the string.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14664 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c
87fc2a9cdecaf88c3e847a168057b2122c9cab04 15-Aug-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Some cleanup post QGetTlsAddr commit
* remove useless commented line in hgtls.vgtest
* avoid some #ifdef in arch specific code, hoping to discover more compile
time errors.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14287 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c
1670b05a4a415dbfd75b1a120713b4a206bb719e 15-Aug-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> fix 338160: Implement QGetTlsAddr query so that GDB+V gdbsrv can print __thread variables.

To implement QGetTlsAddr, gdbsrv has to know how to get the glibc dtv
address and the module id from the link_map.
These 2 things are dependent on the internals of glibc.
The dependency is mostly isolated in a few lines of arch dependent
code or in an external utility that used a hack + -ldl lib to find
the offset of the modid in the link_map structure.

Tested on x86/amd64/ppc64/s390x. Somewhat tested on ppc32 and arm64.
Untested/a few #ifdef-ed lines not compiled on arm/mips32/mips64
and darwin.

For more background info about thread local storage handling, see
'ELF Handling For Thread-Local Storage' http://www.akkadia.org/drepper/tls.pdf

Changes:
* auxprogs/getoff.c new auxilliary program to get platform specific offsets
(currently only the offset for the module id in struct link_map).
* configure.ac : check for dlinfo(RTLD_DI_TLS_MODID) needed for getoff.c
* new gdbserver_tests/hgtls, testing various types of __thread variables
* various m_gdbserver files:
- implement decoding of the QGetTlsAddr query
- for each platform: platform specific code to get the dtv
- call to external program getoff-<platform> the first time an
__thread variable is printed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14283 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c
4cace66777ca9ee73ea156210c04e9d4cc178395 13-Aug-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Reduce memory needed for symbols, by having the tocptr and local_ep
(used for ppc64 platforms) #ifdef-ed and accessed by macros
that becomes NOP on non ppc64 platforms.
This decreases the debuginfo memory by about 2.5 Mb on a big 32 bit application.

Note : doing that, some questions were encountered in the way
tocptr and local_ep have (or do not have) to be copied/maintained
in storage.c canonicaliseSymtab



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14273 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c
c91f58449e6fc2a4ce0851639a342c4277612fbb 15-Sep-2013 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix inclusion of header files in coregrind. No pub_tool_*.h should be
included here.
Added pub_core_poolalloc.h and renamed pub_tool_inner.h to pub_core_inner.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13548 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c
6bd9dc18c043927c1196caba20a327238a179c42 23-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Changes to allow compilation with -Wwrite-strings. That compiler option
is not used for testcases, just for valgrind proper.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13137 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c
1636d33c13958b9c0e7d3059cdd5005746418eb2 15-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Char/HChar fixups for m_debuginfo and m_gdbserver.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13122 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c
d7209def7f1ffcc0b415710afb95c9eacca71155 21-Jul-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Localise "struct reg regs[]".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12769 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c
419d5f2931a88d5e15e78fdaeac4d550aaf1e789 24-May-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> gdbserver: introduce support to show the AVX registers.

This implies to change the interface between the
arch independent gdbserver files and the arch dependent files
as AVX implies a choice of xml files at run time.

In valgrind-low-amd64.c, the xml files and the nr of registers
are different depending on AVX support or not.

Other platforms still have a fully static nr of registers.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12581 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c
99d6134ba5d8fcb01f73c07704fd6674e5702008 17-May-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> gdbserver: Fixes for ARM-Thumb (#214909 c 76)
fix arm thumb by transforming an address to its thumb form when needed

* added a function thumb_pc transforming a pc to its thumb form if needed
(using an heuristic to guess if this is a thumb address)
* when program counter is modified by gdb, use thumb_pc
* use thumb_pc in monitor command vg.translate

(I was able to check that this improves inferior call on a small
thumb compiled executable + mcinfcallRU test) but I could not compile
all tests with thumb).

(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11768 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c
3b290486cd4cd601b20e04340e593c9ed9717e5f 06-May-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_gdbserver/valgrind-low-arm.c