This job shouldnât be taking this long! Thatâs not a great thing to have to say, is it? However, I bet youâve said it before and may not have immediately know why. With liberal use of puts and maybe pry, you can figure out what a problem might be next time you run it, but sometimes you need to figure out what that problem is right now. As it turns out, and I know this is a shocker, Ruby processes
gdbã®ptypeã使ãã®ãç°¡åã ä¾ãã°ã以ä¸ã®foo.cã #include <sys/types.h> struct st { int i; char c; }; typedef int Array[10]; typedef struct st St; int main(void) { size_t s1; ssize_t s2; pid_t pid; Array arr; St st1; return 0; } $ gcc -Wall -g -o foo foo.c $ gdb foo (gdb) b main (gdb) run (gdb) ptype s1 type = long unsigned int (gdb) ptype size_t type = long unsigned int (gdb) ptype s2 type = long int (gdb) ptype
gdb7 hooks for MRI (c) 2009 Aman Gupta (tmm1) === Requirements gdb.rb currently requires x86_64 linux, and MRI/REE 1.8.x or 1.9.2. === Usage $ ps aux | grep deploy.rb 13074 0.0 0.7 90164 31720 ? R Sep23 2:21 /usr/bin/ruby /usr/bin/god -c deploy.rb $ sudo gdb.rb 13074 GNU gdb (GDB) 7.0 Reading symbols from /usr/bin/ruby...done. Attaching to program: /usr/bin/ruby, process 13074 0x00007fa8b9cb3c93 i
Goè¨èªã¯ gdbã§ã®ãããã°ããµãã¼ãããã¦ãã ã®ã ããOS X ã§ããã使ããã¨ãããããããç½ ã«ã¯ã¾ã£ãã®ã§ããã«è¨ãã¦ããã (ãã®ã¨ã³ããªå·çæã®æå ã®ç°å¢ã¯ OS X 10.9(.0) Mavericks + Xcode 5.0.1) ç½ ä¸è¦§ OS X ä»å±ã®gdbãå¤ã Xcode 5.0.1ã®clangã ã¨gdbã®ãã«ããããã ãã«ãããgdbã¯python2ã«ãªã³ã¯ãããªãã¨Goä»å±ã®runtime-gdb.pyãåããªã[1] ãã«ãããgdbã«ã³ã¼ãç½²åãããªãã¨ä»ããã»ã¹ãã¢ã¿ããã§ããªã OS X ä»å±ã®gdbãå¤ã Goã®ã³ã¼ããgdbã§ãããã°ããã«ã¯ãgdb 7.1以ä¸ãå¿ è¦ã¨ãããã¨ã ããOS X (Xcode?) ä»å±ã®gdbã¯å¤ãã¦ä½¿ããªãã æå ã®ãã¼ã¸ã§ã³ã¯ GNU gdb 6.3.50-20050815 (Apple version gdb-
ããã»ã¹ãããã¯ã°ã©ã¦ã³ãå®è¡ããã¦ãã°ã¢ã¦ãããããå¶å¾¡ç«¯æ«ããªããªãã®ã§ãwrite å ããªãã¦ã¨ã©ã¼ã«ãªã ãªãã¤ã¬ã¯ãããã®ãå¿ãã ã¨ãããããªã±ã¼ã¹ãæ³å®ã screen ã使ã£ã¦ãã¨ãããªãã¤ã¬ã¯ãå ãã¡ããã¨æå®ãã¦ããã°ããã®ã ãã©ããã£ããã¯ããã®ã§ã stackoverflow ã«è§£æ±ºæ¡ããã£ãã®ã§ã¡ã¢ã Redirect STDERR / STDOUT of a process AFTER itâs been started, using command line? http://stackoverflow.com/questions/593724/redirect-stderr-stdout-of-a-process-after-its-been-started-using-command-lin èµ·åæ¸ã¿ããã»ã¹ã®ãªãã¤ã¬ã¯ãå ãè¨å®ãã ã¢ã¤ãã¢ã¯ GDB ã§
When I run GDB against a program which loads a .so which is linked to pthreads, GDB reports error "Cannot find new threads: generic error". Note that executable that I run is not linked with pthreads. Any clues? $ gdb --args lua -lluarocks.require GNU gdb (GDB) 7.0-ubuntu Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are fre
ã²ããã Vim ã§ã³ã¼ããªã¼ãã£ã³ã°ã«ç²ãã¦ããã®ã§ CGDB ãå°å ¥. Homebrew ã«ãã£ãã®ã§ããã§ãã. $ brew install cgdb Warning: It appears you have MacPorts or Fink installed. Software installed with other package managers causes known problems for Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again. ==> Downloading http://downloads.sourceforge.net/project/cgdb/cgdb/cgdb-0.6.5/cgdb-0.6.5.tar.gz ################
åå: PHPã½ã¼ã¹ã³ã¼ããªã¼ãã£ã³ã°å ¥é(ã¨ã£ãããç·¨) - id:anatooã®ããã° PHPã®ã½ã¼ã¹ã³ã¼ããèªãã§ããéã«ãã©ããã¦ãã½ã¼ã¹ã³ã¼ããèªãã ãã§ã¯ããããããªãé¨åã¨ããã®ãåºã¦ããããã®è¨äºã§ã¯PHPããããã¬ã§åããã¦å é¨ã®åããæããã«ããæ¹æ³ãæ¸ãã ã½ã¼ã¹ã³ã¼ãã®åå¾ gitããåã£ã¦ããã $ git clone https://github.com/php/php-src.git ãããã¬ã§åãããããã«ãã«ããã ä½è¨ãªæ¡å¼µã¯ç¡ãã§ããããã¬ã§åãããããã«ãã«ããããconfigureæã«--enable-debugãªãã·ã§ã³ã渡ãã $ cd php-src $ ./buildconf $ ./configure --disable-all --enable-debug $ make GDBã§åãã makeããå¾ãã³ãã³ãã©ã¤ã³ã§åããããã¤ããªã¯
ããã«ã¡ã¯ãDeNAã®æ¨å£ã§ãã Perlã§æ¸ãããã¢ããªãåããã¦ããã¨ãã«ãPerlã®ããã»ã¹ãä»ã³ã¼ãã®ä½å¦ãå®è¡ä¸ãªã®ãç¥ããããã¨ãããããã¾ãããã®ãããªå ´åã«ã¯ãgdbã§å®è¡ä¸ã®ããã»ã¹ã«ã¢ã¿ããããPerlã¤ã³ã¿ããªã¿ã¤ã³ã¹ã¿ã³ã¹ã®å é¨ãè¦ããã¨ã«ãã£ã¦èª¿ã¹ããã¨ãã§ãã¾ããã¾ãåæ§ã®æ¹æ³ã§ãããã»ã¹ã®ã³ã¢ãã³ããåããå¾ã§ãã£ãããããã¬ã§èª¿ã¹ããã¨ãå¯è½ã§ãã ãããã°ã·ã³ãã«ä»ãã®Perlãç¨æãã ã¾ãåæã¨ãã¦ãPerlã®å®è¡å½¢å¼ã«ãããã°ã·ã³ãã«ãä»ãã¦ããå¿ è¦ãããã¾ããç¡ãå ´åã§ãä¸å¯è½ã§ã¯ããã¾ããããç¾å®çã«ã¯é£ããã§ãããããããã°ã·ã³ãã«ä»ãã®Perlãç¨æããæ¹æ³ã¯OSã«ããã¾ãããä¾ãã°rpmã使ã£ã¦ããGNU/Linuxãã£ã¹ããªãã¥ã¼ã·ã§ã³ã§ããã°perl-debuginfoã®ããã«åé¢ãããããã±ã¼ã¸ã«ãããã°ã·ã³ãã«ãå ¥ã£ã¦ãããã¨ãå¤ã
æ®æ®µWebãµã¼ããéç¨ãã¦ãã¦ãããã©ããããã©ãã«ã®ã²ã¨ã¤ã«ãSegmentation faultããããã¾ãã ããã¼ï¼ãªãã500ã¨ã©ã¼ãã§ããªã¼ãªãã¦æã£ã¦ãã°ãè¦ãã¨Segmentation faultã«ãªã£ã¦ãã¨ãã¯æ»ã«ãããªãã¾ãã ããããSegmentation faultã¯ã¡ã¢ãªä¸ã«ãããã¼ã¿ã«å¯¾ãã¦ä¸æ£ãè¡ãããã¨ãã«èµ·ãããã®ã§ã ã¤ã³ãã©ã¨ã³ã¸ãã¢ã«ã¨ã£ã¦ã¯ãªããªãæãã ããªãã¨ããã§ãããã¾ãã ããã§ããªãã¨ããã¦æ²»ããªãã¨ãããªããããªã®ã§ ããã¦ã©ã®ããã°ã©ã ãæªããã¦ããã©ãããããã¯èª¿ã¹ä¸ãã¦ã¿ã¾ãã apacheã§ã®ãã° apache + mod_perl ã§ã®ç°å¢ã§ãã ãããªæãã§ã¨ã©ã¼ãã§ã¾ãã #tail error_log [notice] child pid 26028 exit signal Segmentation fault (11
Emacs + GDB ãå©ç¨ããããªãã°ãä½ããã GNU Emacs Manual: Debuggersï¼è±èªï¼ ãèªããã¨ãå¼·ããããããã¾ãã å訳ãåå¨ãã¾ããå 容ãå¤ãããã¦ã¹ãå©ç¨ããæä½ãã°ã©ãã£ã«ã«ãªæ©è½ã«ã¤ãã¦ã®è¨è¿°ãããã¾ããã§ããã ããã¥ã¢ã«ãèªãã§ç解ãããã¨ã¯å®è·µã§è¦ãã¦ããããã§ããã以ä¸ã«ã¾ã¨ãããã¼ãã·ã¼ããå©ç¨ããã°æéãç¯ç´ã§ããããããã¾ããã ããã便å©ãªæ©è½ã«é¢ãã¦æ¼ããããã°æ¯éæãã¦ãã ããã .emacs ;;; GDB é¢é£ ;;; æç¨ãªãããã¡ãéãã¢ã¼ã (setq gdb-many-windows t) ;;; å¤æ°ã®ä¸ã«ãã¦ã¹ã«ã¼ã½ã«ãç½®ãã¨å¤ã表示 (add-hook 'gdb-mode-hook '(lambda () (gud-tooltip-mode t))) ;;; I/O ãããã¡ã表示 (setq gdb-use
ãããããã¬ã¼ã¯ãã¤ã³ãã¨ããæ©è½ã¯ãããã¬ã®æå©ããªãã§ã¯å®ç¾ã§ãã¾ããã ãã¬ã¼ã¯ãã¤ã³ãã¨ã¯ããã°ã©ã ã®å¼·å¶ä¸æåæ¢ãè¡ããã¤ã³ãã§ãå®è¡ä¸ã®ããã°ã©ã ããã¬ã¼ã¯ãã¤ã³ãã«ééããã¨ããã°ã©ã ã¯ä¸æåæ¢ããããããã¬ã«ããããã°ã©ã ã¸ã®ä»å ¥ãè¡ããããã«ãªãã¾ãã ãã¬ã¼ã¯ãã¤ã³ãã¯æ¬¡ã®ãããªå ´æã«è¨å®ã§ãã¾ãã æå®ããè¡çªå·ã®ããã°ã©ã ãå®è¡ãããã¨ããç¬é é¢æ°ãå¼ã³åºããç¬é ãã®ä»ãC++ãªã©ã§ã¯ãä¾å¤ãçºçããç¬éããªã©ã«ããã¬ã¼ã¯ãã¤ã³ããè¨å®ãããã¨ãã§ãã¾ãã è¡çªå·ãã¬ã¼ã¯ ãã¬ã¼ã¯ãã¤ã³ãã¨ãã¦ãã使ç¨ãããã®ã¯ããããã°ã©ã ã®ç¹å®ã®ä½ç½®ãã§ãã ä¾ã¨ãã¦ãbubblesort.cããã°ã©ã ã®sorté¢æ°å ã§ãé£ãåãäºã¤ã®è¦ç´ ãæ¯è¼ãã¦ããç®æã«ãã¬ã¼ã¯ãã¤ã³ããè¨å®ãã¦ã¿ã¾ãã 25|/* bubble sort */ 26|void sort(int *a
ãããã°ããã¹ããè¡ã£ã¦ããã¨ãããã°ã©ã ãç¡éã«ã¼ãã«å ¥ãè¾¼ãã§è¿ã£ã¦ããªããããªç¶æ³ãçºçãããã¨ãããã¾ãã ãã®ãã°ãåç¾ã®é£ãããã®ã§ããã°ãgdbã使ã£ã¦èµ·åãã¨ãã°è¯ãã£ãããããã¨ãããããªæ°åã«ãªãæãããã¾ãã ããããgdbã«ã¯æ¢ã«èµ·åãã¦ããããã°ã©ã ã®å¶å¾¡ã横ãã奪ãåã£ã¦ãããã°ããã¨ãããããããæ©è½ãããã¾ãã ããã§ã¯ãæ¢ã«èµ·åãã¦ããããã°ã©ã ãgdbã§ãããæ¹æ³ã説æãããã¨æãã¾ãã å®éã«ãããã°ãããæ¹æ³ã説æããã¨ããããã¯ãgdbã§åãã¦ããããã»ã¹ã«ã¢ã¿ããããä¾ã説æãã¾ãã ãã®å¾ã®ãããã°ã«é¢ãã¦ã¯ããã¤ãã®gdbã®ä½¿ãæ¹ããã¦ããã ããã°å¤§ä¸å¤«ã§ãã ã¨ããããã¢ã¿ãããã¦ã¿ã æ¢ã«èµ·åãã¦ããããã»ã¹ãgdbã解æããã®ã¯é常ã«ç°¡åã§ãã åã«gdbã§ããã»ã¹ã«ã¢ã¿ããããã ãã§ãã gdbã§ããã»ã¹ã«ã¢ã¿ããããæ¹æ³ã¯2ã¤ããã¾
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}