From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Frank Schmitt Newsgroups: gmane.emacs.devel Subject: Re: Bug Database? Date: Thu, 19 Oct 2006 13:46:35 +0200 Organization: Hamme net, kren mer och nimmi Message-ID: References: <17717.20433.183356.106695@kahikatea.snap.net.nz> <17718.15996.727727.91417@kahikatea.snap.net.nz> <17719.20082.610297.834477@kahikatea.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1161258489 2175 80.91.229.2 (19 Oct 2006 11:48:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Oct 2006 11:48:09 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 19 13:48:08 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GaWNS-0001A5-V6 for ged-emacs-devel@m.gmane.org; Thu, 19 Oct 2006 13:47:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GaWNS-0002lo-G6 for ged-emacs-devel@m.gmane.org; Thu, 19 Oct 2006 07:47:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GaWNA-0002iB-VN for emacs-devel@gnu.org; Thu, 19 Oct 2006 07:47:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GaWNA-0002g7-6Y for emacs-devel@gnu.org; Thu, 19 Oct 2006 07:47:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GaWN9-0002fC-TJ for emacs-devel@gnu.org; Thu, 19 Oct 2006 07:47:39 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GaWN9-0000Wk-8o for emacs-devel@gnu.org; Thu, 19 Oct 2006 07:47:40 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GaWMW-0000vr-7I for emacs-devel@gnu.org; Thu, 19 Oct 2006 13:47:00 +0200 Original-Received: from dhcp81.uni-koblenz.de ([141.26.71.81]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Oct 2006 13:47:00 +0200 Original-Received: from ich by dhcp81.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Oct 2006 13:47:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 60 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dhcp81.uni-koblenz.de X-Face: :EL9TzGRN){7|oE2~xQ8Q(VjpjsXgX$~gi&rYD5J5p)$w\Thdl~v:7h`/n)J!8nXT%_+Wj6}@EHM8}QbA(9nX-wrQ:ch1%DauV[?kFasXUcnL#+"K8zOx&$@/M'/}, q-eztaJra1|?C+p$h\2XnK-HB"8_U List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60921 Archived-At: Nick Roberts writes: > > So most C++ developers I know have switched to the "free as in free beer > > but not free as in free software" debugger from Sun Studio which in > > contrast to gdb works really well. > > People can choose not to fix GDB, it's a voluntary project. First for those who have no idea about what we are talking about: In C++ you can write something like ----------------------------------------------------------------------------- template void doSomething(imgtype1* img1, imgtype2* img2){ //do something with image img1 and image img2 which can both be either //8 or 16 bits per pixel } int main(){ unsigned char* image1 = getRawImageData1(); int bpp1 = getBitsPerPixel1(); unsigned char* image2 = getRawImageData2(): int bpp2 = getBitsPerPixel2(); if (bpp1==8 && bpp2==8) doSomething(image1, image2); if (bpp1==8 && bpp2==16) doSomething(image1, (unsigned short*)image2); if (bpp1==16 && bpp2==8) doSomething((unsigned short*)image1, image2); if (bpp1==16 && bpp2==16) doSomething((unsigned short*)image1, (unsigned short*)image2); } ----------------------------------------------------------------------------- If you compile this, four instances of the function doSomething are generated, in each imgtype1 and imgtype2 is substituted with a real data type. If you now start the program in gdb and say "break doSomething", the breakpoint will always be set at the first instance of the function which gdb finds. If this isn't the instance your program is just using, you can't debug the function. (Ok, there are some tricks, but even if you managed to set the breakpoint correctly there's still reakage in e.g. "until".) So basically what had to be done is: If you make the lookup between line in source code and offset in object code, look if you are in a templated function, if yes search for all matching offsets in object code instead of only the first one. I looked at the code and while I wasn't able to do the fix myself, I think for someone who knows gdb's internal, the fix wouldn't be much work. If gdb had a leader who said "we don't ship broken code", gdb developers would be at annoyed because their favorite new feature of which they are proud and fond isn't released to the public and would eventually sit down and fix it, just as it happens in Emacs. -- Did you ever realize how much text fits in eighty columns? If you now consider that a signature usually consists of up to four lines, this gives you enough space to spread a tremendous amount of information with your messages. So seize this opportunity and don't waste your signature with bullshit nobody will read.