From mboxrd@z Thu Jan 1 00:00:00 1970 From: Piet Delaney Subject: object oriented programming vs debug oriented programing (Ex: debugging dm code with kgdb) Date: Mon, 09 Oct 2006 17:25:09 -0700 Message-ID: Reply-To: piet@bluelane.com, device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: dm-devel@redhat.com List-Id: dm-devel.ids Are the devlopers of the device mapping code awair of how difficult they are making debugging of the code with kgdb? Doing object programing like style programming in C has a major downside. Code that manages the struct dm_table is in dm_table.c and thus code in dm_ioctl.c can mess with the structure. Unfortunately when useing kgdb on the code you can see the struct dm_table stuff via pointers becasue struct dm_table has been declared as an empty structure. It would be very helpfull for kgdb users if the declaration of dm_table was made in dm.h, at least for KGDB kernels, just to make the code easier to follow with kgdb. -piet