summaryrefslogtreecommitdiffstats
path: root/base/debug/debugger_posix.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove --debug-on-start and --debug-children.pkasting@chromium.org2014-04-171-18/+0
| | | | | | | | | | | | | | | | | debug_on_start_win.cc also had some code to support --wait-for-debugger, but I don't think it's important to preserve it. This would only have any effect in modules which included debug_on_start.h, which was basically just test code; and it also wouldn't have any effect when the component build is enabled, which I suspect is true for most developers trying to run tests. I didn't remove any of the other pieces of --wait-for-debugger elsewhere. BUG=359822 TEST=none R=darin@chromium.org Review URL: https://codereview.chromium.org/227723008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264671 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compilation of base for arm64sdefresne@chromium.org2014-02-061-1/+3
| | | | | | | | | | | | | | | | | Add support for the architecture to build/build_config.h (define new macro ARCH_CPU_ARM64 to identify the CPU architecture and set the other appropriate macros to 1). Fix DEBUG_BREAK_ASM() macro to expand to the correct instruction on arm64 cpu (as instruction set is not compatible with previous version of ARM instruction sets). BUG=339477 R=mark@chromium.org Review URL: https://codereview.chromium.org/145273028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249246 0039d316-1c4b-4281-b951-d872f2087c98
* Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close.mark@chromium.org2013-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is incorrect to wrap close in HANDLE_EINTR on Linux. Correctness is generally undefined on Mac, but as of r223369, it is incorrect in Chrome on Mac. To avoid new offenders, a PRESUBMIT check ensures that HANDLE_EINTR is not used with close, and that IGNORE_EINTR is only used with close. Unnecessary #includes of eintr_wrapper.h are also removed. base/posix/einter_wrapper.h, PRESUBMIT.py, and ppapi/tests/test_broker.cc contain non-mechanical changes. Variable naming within the latter is updated per r178174. Missing #includes for <errno.h> in content/zygote/zygote_main_linux.cc and tools/android/common/daemon.cc were manually added. Mechanical changes were generated by running: sed -E -i '' \ -e 's/((=|if|return|CHECK|EXPECT|ASSERT).*)HANDLE(_EINTR\(.*close)/\1IGNORE\3/' \ -e 's/(ignore_result|void ?)\(HANDLE_EINTR\((.*close\(.*)\)\)/\2/' \ -e 's/(\(void\) ?)?HANDLE_EINTR\((.*close\(.*)\)/\2/' \ $(git grep -El 'HANDLE_EINTR.*close') sed -E -i '' -e '/#include.*eintr_wrapper\.h"/d' \ $(grep -EL '(HANDLE|IGNORE)_EINTR' \ $(git grep -El '#include.*eintr_wrapper\.h"')) BUG=269623 R=agl@chromium.org, jln@chromium.org TBR=OWNERS Review URL: https://codereview.chromium.org/100253002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238390 0039d316-1c4b-4281-b951-d872f2087c98
* Put back debug break instructions for non-x86 OSsjochen@chromium.org2013-10-291-8/+14
| | | | | | | | | | | | Turns on out OS_IOS also defines OS_MACOSX BUG=none R=justincohen@chromium.org, mark@chromium.org NOTRY=true Review URL: https://codereview.chromium.org/46883007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231617 0039d316-1c4b-4281-b951-d872f2087c98
* On posix, only break into debugger when a debugger is presentjochen@chromium.org2013-10-281-9/+13
| | | | | | | | | | | | That way, breakpad will generate a minidump on CHECK() and related macros (if breakpad is enabled). BUG=247431 R=mark@chromium.org Review URL: https://codereview.chromium.org/48513002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231341 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in base/.avi@chromium.org2013-06-111-1/+1
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16745002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205530 0039d316-1c4b-4281-b951-d872f2087c98
* drop unused execinfo.h headervapier@chromium.org2013-05-281-4/+0
| | | | | | | | | | | | | The execinfo.h header only provides prototypes for backtrace funcs. These two files don't use those funcs, so the include is unused. Punt it to make building on non-glibc systems easier. BUG=None TEST=trybot for linux/nacl/cros work Review URL: https://chromiumcodereview.appspot.com/16120002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202666 0039d316-1c4b-4281-b951-d872f2087c98
* When debugger is attached, use int3 to break debugger for Android x86.shouqun.liu@intel.com2013-04-231-6/+11
| | | | | | | | | | Patch follows up https://codereview.chromium.org/13891005/. BUG= Review URL: https://chromiumcodereview.appspot.com/14267012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195751 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the CHECK macro for Android x86 builds.shashishekhar@chromium.org2013-04-161-4/+2
| | | | | | | | | Instead of sending SIGABRT CHECK was sending the SIGTRAP signal. BUG=178743 Review URL: https://codereview.chromium.org/13891005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194452 0039d316-1c4b-4281-b951-d872f2087c98
* Android: improve native debuggabilitymostynb@opera.com2013-04-081-10/+13
| | | | | | | | | | | | When starting with --wait-for-debugger command line option, it's ending up in a busy loop waiting for a variable to be changed. Change that busy loop from a macro to a function. It avoids having to step on instruction level to find the right stack frame before the variable is visible. Review URL: https://chromiumcodereview.appspot.com/13597005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192944 0039d316-1c4b-4281-b951-d872f2087c98
* base: Update the include paths of base/string_piece.h to its new location.tfarina@chromium.org2013-03-301-1/+1
| | | | | | | | | | | string_piece.h was moved into base/strings/ in r191206 - https://chromiumcodereview.appspot.com/12982018/ TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/13374002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191508 0039d316-1c4b-4281-b951-d872f2087c98
* Move eintr_wrapper.h from base to base/posixbrettw@chromium.org2012-11-141-1/+1
| | | | | | Review URL: https://codereview.chromium.org/11366229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167739 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Make Linux stack dump signal handler async-signal safe.phajdan.jr@chromium.org2012-11-141-2/+15
| | | | | | | | | | | This also re-enables in-process stack dumping on Linux. BUG=101155 Review URL: https://chromiumcodereview.appspot.com/11362048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167714 0039d316-1c4b-4281-b951-d872f2087c98
* Remove executable bits on file.mmoss@chromium.org2012-08-091-0/+0
| | | | | | | | | TBR=brettw@chromium.org TEST=fixes checkperms on Linux builder. Review URL: https://chromiumcodereview.appspot.com/10855077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150798 0039d316-1c4b-4281-b951-d872f2087c98
* [MIPS] Add DEBUG_BREAK() for MIPS architecture.petarj@mips.com2012-08-091-0/+2
| | | | | | | | | | | Small change to add correct asm break instruction for MIPS architecture. BUG= https://code.google.com/p/chromium/issues/detail?id=130022 TEST=make chrome Review URL: https://chromiumcodereview.appspot.com/10834234 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150789 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream Android-specific changes to debugger_posix.ccjknotten@chromium.org2012-06-291-7/+19
| | | | | | | | | | | | | | | | | | | | | | | Check if there's a debugger attached before entering the infinite loop and if not abort instead so we get a nice backtrace and tombstone. Without this CHECK and DCHECK cause hangs and ANRs which are not obvious to interpret. If you're trying to debug startup this might inconvenience you somewhat, so you may to add --wait-for-debugger to the command line so startup pauses until gdb is attached. Also, exit the program in BreakDebugger on Android only if we're running an unofficial build. This is because we always build Release as Debug binaries are too large. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10702004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144882 0039d316-1c4b-4281-b951-d872f2087c98
* PPAPI/NaCl: Remove call of system() from NaCl builddmichael@chromium.org2012-06-091-1/+1
| | | | | | | | | | | | | The system calls used by system() aren't available in NaCl and cause a link error in the NaCl IPC proxy build. BUG=116317 TEST= R=brettw Review URL: https://chromiumcodereview.appspot.com/10534078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141338 0039d316-1c4b-4281-b951-d872f2087c98
* Implement SpawnDebuggerOnProcess for POSIX.jyasskin@chromium.org2012-06-061-1/+12
| | | | | | | | | | | | This launches a gdb in an xterm. It may or may not work on Mac. TEST=On Linux, added a call in a utility process, and watched an xterm come up with a debugger at that point. Review URL: https://chromiumcodereview.appspot.com/10517007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140679 0039d316-1c4b-4281-b951-d872f2087c98
* Make base::Logging compile with the NaCl toolchain.bbudge@chromium.org2012-02-281-2/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/9474034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124025 0039d316-1c4b-4281-b951-d872f2087c98
* Change code in base (primarily unit tests) to use Sleep(TimeDelta).tedvessenes@gmail.com2011-12-311-1/+3
| | | | | | | | | | BUG=108171 TEST= Review URL: http://codereview.chromium.org/9055001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116065 0039d316-1c4b-4281-b951-d872f2087c98
* use os_bsd and OS_BSD and add some OS_FREEBSD conditionsrobert.nagy@gmail.com2011-12-041-10/+8
| | | | | | | | | | | | this change is the first part of the FreeBSD support BUG= TEST= Review URL: http://codereview.chromium.org/8773051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112936 0039d316-1c4b-4281-b951-d872f2087c98
* define OS_BSD on *BSD and replace the ifdefs to use thatrobert.nagy@gmail.com2011-11-151-3/+3
| | | | | | | | | | BUG= TEST=compile Review URL: http://codereview.chromium.org/8564020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109986 0039d316-1c4b-4281-b951-d872f2087c98
* OpenBSD patches for base / split from CR #8275005mark@chromium.org2011-10-181-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | base/base.gypi: - Add native_library_linux.cc to the openbsd build. - Add '..' to include_dirs so that OS_* definitions are available in symbolize.cc base/debug/debugger_posix.cc: - Add support for figuring out if the process is being debugged on OpenBSD by sharing some code with Mac. base/process_util_unittest.cc: - Disable the OutOfMemoryTest on OpenBSD base/third_party/symbolize/symbolize.cc: - Include the correct elf header on OpenBSD build/linux/system.gyp: - The dl library is linux only, so only use it there. BUG= TEST= Review URL: http://codereview.chromium.org/8329023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106078 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream ProcessUtilTest, and make a few other files compile on Android.jingzhao@chromium.org2011-09-291-2/+4
| | | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/8059007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103236 0039d316-1c4b-4281-b951-d872f2087c98
* Remove use of <iostream> where unnecessary.evan@chromium.org2011-09-011-1/+1
| | | | | | | | | | | | | | Any file which uses <iostream> gains a static initializer, which is both disallowed by our style guide and also harms startup performance. Note that Chrome's logging.h uses <ostream> (note missing "i"), which includes the << operators for logging but does *not* use cin/cout. This is fine. BUG=94794 Review URL: http://codereview.chromium.org/7811002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99237 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream android debug and log related filesmichaelbai@google.com2011-07-071-2/+21
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/7238012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91748 0039d316-1c4b-4281-b951-d872f2087c98
* Patch for Solaris support, mostly ifdefs and header files, plus adds ↵chromium@hybridsource.org2011-06-251-4/+5
| | | | | | | | | | | libevent configuration. BUG=30101 TEST=compiles Review URL: http://codereview.chromium.org/7238021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90494 0039d316-1c4b-4281-b951-d872f2087c98
* OpenBSD: make it possible to build libbase.a.phajdan.jr@chromium.org2011-04-151-0/+1
| | | | | | | | | | | | | | This still needs a little hack. I had to run gyp_chromium this way: CHROMIUM_GYP_FILE="base/base.gyp" build/gyp_chromium -DOS=openbsd \ -Duse_gnome_keyring=0 -Duse_system_libevent=1 And then run "gmake base". BUG=none Review URL: http://codereview.chromium.org/6840023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81709 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure the process is _really_ gone after a __debugbreak(). We've had acevans@chromium.org2011-01-211-0/+3
| | | | | | | | | | | | | few annoying cases where someone has been monitoring Chrome under windbg, which can skip over __debugbreak() and then show them a scary-looking access violation. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6372008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72107 0039d316-1c4b-4281-b951-d872f2087c98
* Remove base/debug_util. Move the debug UI related functions to ↵brettw@google.com2011-01-011-1/+1
| | | | | | | | | | | | base/debug/debugger.h Move the OS X specific crash report changing function to base/mac/os_crash_dumps TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6092005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70358 0039d316-1c4b-4281-b951-d872f2087c98
* Remove compat_execinfo since we no longer support Mac 10.4.brettw@chromium.org2010-12-301-1/+1
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6033008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70288 0039d316-1c4b-4281-b951-d872f2087c98
* Help make base compile under NaClabarth@chromium.org2010-12-011-0/+15
| | | | | | | | | | | | This file requires a few tweaks to run under Native Client. For example, there isn't a NaCl API to determine whether the process is being debugged and int3 isn't a valid NaCl instruction. Original patch by Eric Seidel. Review URL: http://codereview.chromium.org/5423002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67827 0039d316-1c4b-4281-b951-d872f2087c98
* Move debug-related stuff from base to the base/debug directory and use thebrettw@chromium.org2010-10-261-0/+165
base::debug namespace. This splits apart debug_util into base/debugger and base/stack_trace There are still two functions in debug_util that I'm not sure what to do with. Since this uses the base::debug namespace, I removed the functions in debugger.h from the static class and just made them free functions in the namespace. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3945002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63859 0039d316-1c4b-4281-b951-d872f2087c98