LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-05-2016, 09:25 AM   #1
subburaj47
LQ Newbie
 
Registered: Apr 2016
Posts: 2

Rep: Reputation: 0
mdb debugger(solaris) equivalent in linux


Hi All,

Could anyone suggest me any debugger equivalent to mdb in solaris?? I am using the libumem port for linux.


Regards,
Subbu
 
Old 04-05-2016, 09:54 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,818

Rep: Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151
Quote:
Originally Posted by subburaj47 View Post
Hi All,
Could anyone suggest me any debugger equivalent to mdb in solaris?? I am using the libumem port for linux.
GDB is extensible, just like MDB is...GDB has it's own scripting language, and can be extended to do whatever you'd like, much like the "M" (MODULAR) in MDB can (with "modules"). The better question is, what particular feature are you missing???
 
Old 04-07-2016, 08:11 AM   #3
subburaj47
LQ Newbie
 
Registered: Apr 2016
Posts: 2

Original Poster
Rep: Reputation: 0
I would like to debug the memory leaks in my code with a debugger. The tool should mainly be capable of reading the core dumps to detect the leaks. And much important is, the need is in Linux.
More short and crisp --> I am searching for a tool in linux which could give the mdb::findleaks functionality.

Last edited by subburaj47; 04-07-2016 at 08:57 AM. Reason: to provide more clarity
 
Old 04-07-2016, 09:27 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,818

Rep: Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151Reputation: 5151
Quote:
Originally Posted by subburaj47 View Post
I would like to debug the memory leaks in my code with a debugger. The tool should mainly be capable of reading the core dumps to detect the leaks. And much important is, the need is in Linux. More short and crisp --> I am searching for a tool in linux which could give the mdb::findleaks functionality.
Right...so use GDB, as you were told in the first reply, "short and crisp".

AGAIN GDB is extensible, as is MDB...you can easily use it with valgrind, and have been able to do so for years. There is ample documentation and thousands of hits in Google for using GDB to do this...did you try to look any of them up???

Activate gdb:
Code:
valgrind --vgdb-error=0 ....<whatever program>
Then in another window, connect a gdb to valgrind, and put a break point at whatever location, and use the gdb command till the break point is reached. Then do a leak search from gdb.
Code:
monitor leak_check full reachable any
By looking up documentation GDB, you can find out more about what it can do. You can list the address(es) of the reachable blocks of the relevant loss:
Code:
monitor block_list <loss_record_nr>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux equivalent to Solaris Projects? jimieee Linux - Server 1 02-27-2012 04:56 PM
[SOLVED] monodevelop-debugger-mdb (2.4) (Slackware64) bassplayer69 Slackware 1 10-09-2011 07:00 PM
solaris equivalent of /etc/networks in linux? cghcgh Linux - Networking 5 03-28-2008 05:56 PM
nohup -p in solaris and equivalent in linux prakash_k Linux - General 4 01-09-2006 12:21 AM
Linux debugger: DDD on solaris kranti Linux - Newbie 1 11-19-2005 04:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration