<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 02/22/2017 05:16 PM, Tahereh Fattahi
wrote:<br>
</div>
<blockquote
cite="mid:CAHG6sptq7N4NqPACe6cZcU10UB9MYbk+GUPsasa0o2sbQMWz3g@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_quote"><br>
<br>
<div dir="ltr">Hello
<div>I want to undrestand the operation of dht translator,
then i decide to debug the code for this aim.</div>
<div>But i can not do that:(</div>
<div>I think i should run gdb in client side, but how? I can
not mount the file system for client from gdb. And if I
mount seperately, I can not run any glusterfs within gdb</div>
</div>
</div>
</div>
</blockquote>
1) Install debuginfo if you are using rpm, if you are using source
code then configure with --enable-debig.<br>
2) Do a fuse mount from client (mount -t glusterfs
server_hostname:/volname /mount_point)<br>
3) find the pidof the mount process (you can grep for glusterfs or
with you volname)<br>
4) Attach gdb to the client process using gdb -p <pidof
glusterfs><br>
5) put your break points in dht functions and then you are good to
go :)<br>
<br>
Regards<br>
Rafi KC<br>
<br>
<blockquote
cite="mid:CAHG6sptq7N4NqPACe6cZcU10UB9MYbk+GUPsasa0o2sbQMWz3g@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">
<div>Is there any way to not using gdb and debug with printf
(Iknow it is very stupid but is easy) and see the serult
in the terminal? </div>
</div>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Gluster-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a>
<a class="moz-txt-link-freetext" href="http://lists.gluster.org/mailman/listinfo/gluster-users">http://lists.gluster.org/mailman/listinfo/gluster-users</a></pre>
</blockquote>
<br>
</body>
</html>